当前位置: 移动技术网 > IT编程>网页制作>CSS > 页面自适应

页面自适应

2019年09月03日  | 移动技术网IT编程  | 我要评论

东营吉奥汽车,陈滢巧,退休人员2016年养老金调整方案

html部分


<div class="div1">
<div class="div2">
<span class="headline">这是一个自适应的标题</span>
</div>
</div>

css部分

.div1{
position: relative;
}

.div2{
position: absolute;
text-align: center;
left: 0;
right: 0;
top: 60px;


}

.headline{
font-size: 45px;

border:2px solid black;
/*border-radius: 20%;*/
padding: 10px 10px;
}

完整模板代码

<!doctype html>

<html lang="en">
<head>
<meta charset="utf-8">
<title>自适应页面</title>
<style type="text/css">
.div1{
position: relative;
}

.div2{
position: absolute;
text-align: center;
left: 0;
right: 0;
top: 60px;


}

.headline{
font-size: 45px;

border:2px solid black;
/*border-radius: 20%;*/
padding: 10px 10px;
}
</style>
</head>
<body>
<div class="div1">
<div class="div2">
<span class="headline">这是一个自适应的标题</span>
</div>
</div>
</body>
</html>





                    

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网