我想像 facebook 注册页面一样,一个div1(section width:1024px)有四个div,左边div2(width:50%) 有div3(fb slogan),下面div4(connect people image)右侧 div4(宽度:50% 注册表单)。如何制作?[在此处输入图片描述][1]
CSS 代码
thân hình
{
margin: 0 auto;
height:100%;
font-family: Calibri;
overflow: scroll;
}
#DivBody
{
margin: auto;
width:1024px;
}
#DivHeader
{
margin:auto;
width:100%;
color: white;
background-color: #3b5998;
hiển thị: khối nội tuyến;
}
#DivSection
{
height: 83%;
vị trí: tuyệt đối;
width: 1024px;
border: 1px solid gray;
padding-top: 23px;
}
#DivContent
{
chiều rộng: 50%;
}
#DivSlogan
{
float:left;
color: #0e385f;
font-size: 20px;
font-weight: đậm;
}
#DivHomeImage
{
float:left;
margin-top: 5%;
vị trí: tuyệt đối;
}
#DivSignUp
{
float: right;
border-radius: 5px;
vị trí: tuyệt đối;
right: 171px;
}
#DivFooter
{
width:1024px ;
hiển thị: khối nội tuyến;
dưới cùng: 0;
}
我用 div 和 float 做了一个简单的例子。这将是一百万种可能性之一。我喜欢 float ……其他人会使用定位或一些 flex/网格。
.wrapper {
width: 1024;
height: 100%;
min-height: 800px; //not absolutly needed
border: 1px solid red; //not needed
}
.slogan {
padding-top: 20px; //not needed
}
.container {
chiều rộng: 50%;
float:left;
}
.people-image {
width: 100%;
border: 1px solid yellow; //not needed
}
.green {
background-color: green; //not needed
}
Facebook slogan goes here
Login Content goes here
Tôi là một lập trình viên xuất sắc, rất giỏi!