边框三角形
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box{
width: 0px;
height: 0px;
border-top: 50px solid transparent;
border-left: 50px solid transparent;
border-right: 50px solid #f0f;
border-bottom: 50px solid transparent;
}
</style>
</head>
<body>
<div class="box">
</div>
</body>
</html>
边框圆角
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box{
width: 405px;
height: 405px;
margin: 100px auto;
border:1px solid #000;
}
.box div{
width: 200px;
height: 200px;
display: inline-block;
}
.box1{
background-color: #f00;
border-radius: 0px 200px;
}
.box2{
background-color: #ff0;
border-radius: 200px 0px;
}
.box3{
background-color: #0ff;
border-radius: 200px 0px;
}
.box4{
background-color: #f0f;
border-radius: 0px 200px;
}
.box:hover{
transition: 5s;
transform: rotateZ(3600deg);
}
</style>
</head>
<body>
<div class="box">
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
<div class="box4"></div>
</div>
</body>
</html>
计算盒子模型
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.demo{
width:200px;
height:200px;
border:1px solid red;
padding:20px;
}
.demo1{
width: 373px;
height: 398px;
padding-left:25px;
border: 1px solid red;
}
.box{
width: 400px;
height: 400px;
border:1px solid #000;
}
.box1{
width: 200px;
height: 200px;
border:1px solid #000;
margin: 100px;
}
</style>
</head>
<body>
<div class="demo"></div>
<div class="demo1"></div>
<div class="box">
<div class="box1"></div>
</div>
</body>
</html>
浮动
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box1{
width: 200px;
height: 200px;
background-color: #00f;
float: left;
}
.box2{
width: 200px;
height: 200px;
background-color: #ff0;
float: left;
}
.box3{
width: 200px;
height: 200px;
background-color: #f0f;
float: right;
}
</style>
</head>
<body>
<div class="box1"></div>
<div class="box2">你好发生发</div>
<div class="box3"></div>
</body>
</html>
清除浮动
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box1{
width: 200px;
height: 200px;
background-color: #00f;
float: left;
}
.box2{
width: 200px;
height: 200px;
background-color: #ff0;
float: left;
}
.box3{
width: 200px;
height: 200px;
background-color: #f0f;
float: right;
}
.box4{
width: 100%;
height: 100px;
background-color: #000;
}
.box{
width: 100%;
height: 200px;
}
</style>
</head>
<body>
<div class="box">
<div class="box1"></div>
<div class="box2">你好发生发</div>
<div class="box3"></div>
</div>
<div class="box4">
</div>
</body>
</html>
网页布局1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
list-style-type: none;
}
.nav{
width: 1200px;
height: 80px;
margin: 0 auto;
}
.nav .logo{
width: 200px;
height: 80px;
float: left;
}
.nav ul{
width: 800px;
height: 80px;
float: right;
}
.nav ul li{
width: 100px;
height: 80px;
float: left;
text-align: center;
line-height: 80px;
}
.navbar{
width: 100%;
height: 40px;
background-color: #999;
}
.navbar-layout{
width: 1200px;
height: 40px;
margin: 0 auto;
}
</style>
</head>
<body>
<div class="nav">
<div class="logo">
<img src="img/logo.jpg" alt="">
</div>
<ul>
<li>首页</li>
<li>关于利人</li>
<li>关于利人</li>
<li>关于利人</li>
<li>关于利人</li>
<li>关于利人</li>
<li>关于利人</li>
<li>关于利人</li>
</ul>
</div>
<div class="navbar">
<div class="navbar-layout">
</div>
</div>
</body>
</html>
网页布局2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
list-style-type: none;
}
.box{
width: 1000px;
height: 300px;
margin: 0 auto;
}
.box div{
width: 300px;
height: 300px;
float: left;
text-align: center;
}
.box div img{
border-radius: 50%;
margin: 50px 0px 30px;
}
.box .middle{
margin: 0px 47px;
}
</style>
</head>
<body>
<div class="box">
<div>
<img src="img/icon-01.jpg" alt="">
<h2>行业解决方案</h2>
<p>
客户服务体系,对讲集群系统<br>手机名片,移动业务,解决方案
</p>
</div>
<div class="middle">
<img src="img/icon-02.jpg" alt="">
<h2>行业解决方案</h2>
<p>
客户服务体系,对讲集群系统<br>手机名片,移动业务,解决方案
</p>
</div>
<div>
<img src="img/icon-03.jpg" alt="">
<h2>行业解决方案</h2>
<p>
客户服务体系,对讲集群系统<br>手机名片,移动业务,解决方案
</p>
</div>
</div>
<p>
—————————————— P U O D U C T ——————————————
</p>
</body>
</html>