1 Star 0 Fork 0

qianlanggong/h5+c3作业库

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backimage的使用.html 2.76 KB
一键复制 编辑 原始数据 按行查看 历史
qianlanggong 提交于 2022-10-18 09:58 . background的使用
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>backimage的使用</title>
<style>
.box00{
width: 360px;
height: 200px;
background-image: url(./images/02.png);
background-size: 100% 100%;
background-repeat: no-repeat;
}
.box01{
width: 360px;
height: 200px;
background-image: url(./images/02.png);
}
.box02{
width: 360px;
height: 200px;
background-image: url(./images/02.png);
background-repeat:repeat-y;
}
.box03{
width: 360px;
height: 200px;
background-image: url(./images/02.png),url(./images/02.png);
background-repeat:no-repeat;
background-position: right bottom,left top;
}
.box04{
width: 360px;
height: 500px;
background-image: url(./images/03.jpg),url(./images/03.jpg),url(./images/03.jpg);
background-repeat:no-repeat;
background-size: 160px;
background-position:60% 60% ,40% 40%,20% 20%;
}
.box05{
width: 360px;
height: 500px;
background-color: #bfa;
border: 1px solid red;
border-width: 50px;
border-image: url(./images/02.png);
border-image-slice: 30;
border-image-repeat: round;
/* border-image-outset: 10px 10px; */
}
.box06{
/* width: 360px; */
height: 500px;
display: flex;
align-items: center;
/* background-color: #bfa; */
}
.box06 p{
margin-left: 10px;
/* background-color: #bfa; */
width: 180px;
}
.box06 div{
width: 40px;
height: 40px;
background-image: url(./images/04.png);
background-repeat: no-repeat;
text-indent: -999;
}
.box06 div:nth-of-type(1){
background-position: 0 -192px;
}
.box06 div:nth-of-type(2){
background-position: -41px -192px;
}
.box06 div:nth-of-type(3){
background-position: -82px -192px;
}
.box06 div:nth-of-type(4){
background-position: -123px -192px;
}
.mod_service_txt{
overflow: hidden;
width: 100%;
height: 42px;
line-height: 42px;
font-size: 18px;
font-weight: 700;
text-overflow: ellipsis;
white-space: nowrap;
color: #444;
}
</style>
</head>
<body>
<div class="box00"></div>
<hr>
<div class="box01"></div>
<hr>
<div class="box02"></div>
<hr>
<div class="box03"></div>
<hr>
<div class="box04"></div>
<hr>
<div class="box05"></div>
<hr>
<div class="box06">
<div></div><p class="mod_service_txt">品类齐全,轻松购物</p>
<div></div><p class="mod_service_txt">多仓直发,极速配送</p>
<div></div><p class="mod_service_txt">正品行货,精致服务</p>
<div></div><p class="mod_service_txt">天天低价,畅选无忧</p>
</div>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/civil-affairs/h5-c3.git
git@gitee.com:civil-affairs/h5-c3.git
civil-affairs
h5-c3
h5+c3作业库
master

搜索帮助