麻烦老师看看
来源:2-7 编程练习
陈孝芳
2019-10-31 22:16:37
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>background-origin</title>
<style type="text/css">
div{
width:800px;
height:500px;
border:10px solid purple;
margin:0 auto;
padding:10px;
background: url(http://climg.mukewang.com/582c342b0001fd6507000210.jpg) no-repeat;
background-size: cover;
background-clip:padding-box;
}
div:hover{
background: url(http://climg.mukewang.com/582c34220001091605000150.jpg) no-repeat 10px 10px;
background-size: cover;
background-origin:content-box;
background-clip: border-box;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
1回答
好帮手慕码
2019-11-01
同学你好!
代码效果正确,很棒。
如果帮助到了你,欢迎采纳,祝学习愉快~