老师,请检查下,谢谢。
来源:2-7 编程练习
qq_慕移动3101913
2019-08-06 16:49:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>background-origin</title>
<style type="text/css">
div{
width:320px;
height:170px;
border:10px solid purple;
background:url(http://climg.mukewang.com/582c342b0001fd6507000210.jpg) no-repeat;
background-clip:padding-box;
}
div:hover{
background:url(http://climg.mukewang.com/582c34220001091605000150.jpg) no-repeat 10px 10px;
background-clip:content-box;
background-position:content-box;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
2回答
同学你好!
代码效果实现的有一些问题,应该是如下:
如果帮助到了你 欢迎采纳 祝学习愉快 ~
好帮手慕码
2019-08-06
同学你好!
border-box更加符合练习要求:
如果帮助到了你 欢迎采纳 祝学习愉快~
相似问题