-webkit-box-reflect:none | <direction> <offset>? <mask-box-image>?
box-reflect:none | <direction> <offset>? <mask-box-image>?
<div class="box1">
<img src="http://7s1r1c.com1.z0.glb.clouddn.com/t_sdfsdfs123.jpg" rel="external nofollow" rel="external nofollow" rel="external nofollow" alt="" />
</div>
<div class="box2">
<img src="http://7s1r1c.com1.z0.glb.clouddn.com/t_sdfsdfs123.jpg" rel="external nofollow" rel="external nofollow" rel="external nofollow" alt="" />
</div>
<div class="box3">
<img src="http://7s1r1c.com1.z0.glb.clouddn.com/t_sdfsdfs123.jpg" rel="external nofollow" rel="external nofollow" rel="external nofollow" alt="" />
</div>
.box1,.box2,.box3{
width:120px;
float:left;
margin-right:180px;
}
img{
width:100%;
}
.box1 img{
-webkit-box-reflect:right;
box-reflect:right;
}
.box2 img,.box3 img{
-webkit-box-reflect: above;
box-reflect:above;
}
.box3{
padding-top:200px;
}
.box1 img{
-webkit-box-reflect:below 30px;
box-reflect:below 30px;
}
.box2 img{
-webkit-box-reflect:below -30px;
box-reflect:below -30px;
}
.box3 img{
-webkit-box-reflect:below 5%;
box-reflect:below 5%;
}
.box1 img{
-webkit-box-reflect:below 0 -webkit-linear-gradient(top,rgba(250,250,250,0),rgba(250,250,250,.0) 30%,rgba(250,250,250,.3));
box-reflect:below 0 linear-gradient(top,rgba(250,250,250,0),rgba(250,250,250,.0) 30%,rgba(250,250,250,.3));
}
.box2 img{
-webkit-box-reflect:below 0 url(http://7s1r1c.com1.z0.glb.clouddn.com/t_star.png);
box-reflect:below 0 url(http://7s1r1c.com1.z0.glb.clouddn.com/t_star.png);
}
結(jié)論
到這里,關(guān)于CSS3的box-reflect屬性的語法和使用已經(jīng)介紹完了,如果您有疑問,歡迎在下面評論。
更多建議: