<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>垂直与水平定位</title>
<style>
.name{
/* 让该样式水平居中呈现 */
margin:0 auto;
border-width: 1px;
border: 3px solid red;
background-color: yellow;
font-size: 0px;
height: 200px;
width: 80%;
/* width: 900px; */
text-align: center;
line-height: 200px;
}
/* .name1{
background-color: pink;
line-height: 1;
display: inline-block;
vertical-align: middle;
} */
.a{
/* width:200px; */
width:30%;
height: 100px;
border-width: 1px;
border: 3px solid red;
垂直 与 水平定位
最新推荐文章于 2024-06-10 23:30:57 发布