感谢您的支持,我会继续努力的!
打开微信扫一扫,即可进行扫码打赏哦
点我查看本站打赏源码!
Powered by RUNCODEX.COM,学的不仅是技术,更是梦想!!!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>文档标题</title>
</head>
<body>
<div class="sidebar">sidebar</div>
</div>
<div class="v-center-table-wrap">
<div class="v-center-table">
<p>我的第一个段落。</p>
</body>
</html>
输入 JavaScript 代码……
xxxxxxxxxx
*,div,h1,p{margin:0;}
html,body{ height: 100%;}
.sidebar{
display: none;
float: left;
width: 200px;
background: #f03;
}
.v-center-table-wrap{
width: 100%;
height: 100%;
display: table;
background: #f66;
.v-center-table{
display: table-cell;
text-align: center;
vertical-align: middle;
margin: 30px;
/*配合宽高使用*/
/* 效果查看 */
background: #f69;