Jump to content
php.lv forumi

css bildes atkārtošanās


Elvis L

Recommended Posts

sveiki, lieta tāda, ka man ir divas bildes: headeri un headera 1px strēmele, kurai vajadzētu atkārtoties fonā, ja monitora izmērs ir liels, pašlaik bilde neatkārtojas

 

 header{ background: url(../img/stremele.jpg) , url(../img/header.jpg) bottom center;
 background-repeat: no-repeat;
 height: 265px;
 }
kādi būtu Jūsu ieteikumi?
 
izdevās kaut kā šādi, nezinu gan cik tasa ir pareizi
 header{ 
 background:url(../img/header.jpg) no-repeat bottom center,url(../img/slice.jpg) repeat-x;
 height: 265px;
 }
Edited by Elvis L
Link to comment
Share on other sites

Parasti to paveic ar diviem elementiem:

<div class="header-outer">
  <div class="header">teksts</div>
</div>

Un CSS:

.header-outer { background: url(../img/slice.jpg) repeat-x) }
.header { background: url(../img/header.jpg) no-repeat bottom center; }

Bieži sanāk ka ārējam elementam var izmantot to pašu <body> un nelikt papildus <div>

 

Strādā jau tā arī kā raksti otrajā piemērā ar CSS3, bet nevaru atrast kuros browseros tas ir supportēts. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...