CSS如何将图片叠加到一起?

html-css08

CSS如何将图片叠加到一起?,第1张

.wrap li:last-child{ border-right:none} 吧最后一个li的border-right的border去掉。。。但是兼容不好,ie好像是ie9以上的浏览器才行~~

不行还有一种方法li给border,通过margin-left:-1px合并border,具体如下

body,ul{

margin:0

padding:0}

li{

list-style:none}

.wrap{

width:385px

height:39px

overflow:hidden

border-left:1px

solid

#0000f0

margin:30px

auto}

.wrap

li{

width:76px

height:37px

line-height:37px

text-align:center

border:1px

solid

#0000f0

float:left

margin-left:

-1px

}

妙味

妙味

妙味

妙味

妙味

演示:

<div

style="background:url('图片路径')">

<div

style="position:

absoluteopacity:0.5top:?px

left:?px

text-align:center">青山绿水</div>

</div>

background:url:图片的路径,

position:

absolute

绝对定位

opacity:0.5:层的透明度,0到1

越小越透明

text-align:center:字体居中显示

top:?px

left:?px

调整那几个字的位置