老师,这道题,没有思路,做不出来,能帮我理一下吗?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>background-size</title>
<style type="text/css">
a{text-decoration:none;}
ul{list-style:none;}
div{
background-image:url("http://img1.sycdn.imooc.com/climg//582c37e50001b08102000065.jpg");
width:100px;height:100px;
display:none;border:2px solid red;
background-repeat:no-repeat;
}
/*补充代码*/
</style>
</head>
<body>
<h2>background-size不同属性值不同效果</h2>
<ul>
<li class="length">
<h3><a href="">100px 100px</a></h3>
<div></div>
</li>
<li class="percent">
<h3><a href="">50% 50%</a></h3>
<div></div>
</li>
<li class="cover">
<h3><a href="">cover</a></h3>
<div></div>
</li>
<li class="contain">
<h3><a href="">contain</a></h3>
<div></div>
</li>
</ul>
</body>
</html>
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星