CSS背景使用,引入、尺寸、平铺、定位、多重背景
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
margin: auto;
padding: 0;
}
#a1{
width: 100px;
height: 100px;
border: 1px solid red;
margin-top: 30px;
border-radius: 15px 20%;
box-shadow: 5px 10px;
}
#a2{
width: 300px;
height: 300px;
border: 1px solid red;
background-image: url(../img/1.jpg);
background-size: 100% 100%;
background-repeat: no-repeat;
margin-top: 30px;
}
#a3{
width: 300px;
height: 300px;
border: 1px solid red;
background-image: url(../img/1.jpg);
background-position: bottom;
background-repeat: no-repeat;
margin-top: 30px;
}
#a4{
width: 400px;
height: 400px;
border: 1px solid red;
background-image: url(../img/1.jpg),url(../89ca0e54-6537-4aa4-8ac6-be6ec29b6636.jpg);
background-repeat: no-repeat;
margin-top: 30px;
}
</style>
</head>
<body>
<div id="a1">
</div>
<div id="a2">
</div>
<div id="a3">
</div>
<div id="a4">
</div>
</body>
</html>
最新文章
- Laravel Composer and ServiceProvider
- SHELL编写NGINX自动部署脚本
- 聊下git pull --rebase
- PHP常用数据库代码汇总
- 我所了解的chrome
- JS URL传递中文参数时出现乱码的处理
- linux上进程状态查询
- HTML5_Canvas_属性、定义及方法
- X5学习笔记—给单元格添加颜色
- vim编码相关配置
- git push后修改错误的commit message
- XSS解决方案系列之四:关于编码
- floyd+动态规划 hdu-4571-Travel in time
- Asp.net 主题 【1】
- STM32关于优先级设定的理解 NVIC_SetPriority()
- Embedded Linux Primer----嵌入式Linux基础教程--章节介绍
- 14.2.4 InnoDB Undo Logs
- Oracle SQL Lesson (3) - 使用单行函数自定义输出
- System.BadImageFormatException: 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)
- Exchange 2010 实用小技巧