CSS中background的属性值
background-color background -i mage background-re PE at background-pos IT ion background-attachment复合属性:background:background-color background-image background -repeat background-position background-attachment
CSS3新增:不能用background的复合属性
background-size ,background-ori gin ,background-clip
<!DOCTYPE ht ML >
<html>
<head>
< ;m eta charset="utf-8">
<title></title>
<style>
*{
m arg in: 0;
padding: 0;
}
.pic{
width: 300px;
h ei ght:400px;
border: 20px dashed aqua;
padding: 30px;
/* background-color: # f90;
background-image:url(https://t img sa.b ai du .COM /timg?image& am p; quality=80&size=b9999_10000&sec=1603882574342&di=e
fe3283a838ee F1 0140bcab16bf06371&imgtype=0&src=http%3A%2F%2Fdpic.tiankong测试数据%2F8i%2Fzu%2FQJ6411171137. jpg );
background-repeat: no-repeat;
background-position: 50% 50%;
background-attachment: fixed; */
background:#f90 url(https://timgsa.baidu测试数据/timg?image&quality=80&size=b9999_10000&sec=1603882574342&di=e
fe3283a838eef10140bcab16bf06371&imgtype=0&src=http%3A%2F%2Fdpic.tiankong测试数据%2F8i%2Fzu%2FQJ6411171137.jpg)
no-repeat 50% 50% fixed;
background- Size: 100px 100px;
background-origin: border-box;
background-clip: content-box;
}
</style>
</head>
<body>
<div class="pic"></div>
</body>
</html>
到此这篇关于详解background属性的8个属性值(面试题)的 文章 就介绍到这了,更多相关background属性值内容请搜索以前的文章或继续浏览下面的相关文章,希望大家以后多多支持!
总结
以上是 为你收集整理的 详解background属性的8个属性值(面试题) 全部内容,希望文章能够帮你解决 详解background属性的8个属性值(面试题) 所遇到的问题。
如果觉得 网站内容还不错, 推荐好友。
查看更多关于详解background属性的8个属性值(面试题)的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did201582