martinesk
2015-01-20 21:59
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>多重背景</title>
<style type="text/css">
.demo {
width: 300px;
height: 140px;
border: 1px solid #999;
padding:30px;
background:60,60,60,0.5 url(http://static.mukewang.com/static/img/logo_index.png)border-box padding-box no-repeat right bottom /50% 50%,
url(http://static.mukewang.com/static/img/logo_index.png) no-repeat left top/ 80% 40% padding-box content-box ;
}
</style>
</head>
<body>
<div class="demo"></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>多重背景</title>
<style type="text/css">
.demo {
width: 300px;
height: 140px;
border: 1px solid #999;
background:url(http://static.mukewang.com/static/img/logo_index.png) no-repeat,
red url(http://static.mukewang.com/static/img/logo_index.png) no-repeat;
}
</style>
</head>
<body>
<div class="demo"></div>
</body>
</html>上面这样是可以的,把颜色放到第二个部分。
十天精通CSS3
243146 学习 · 2677 问题
相似问题
回答 1
回答 1