我想要一个自定义框。
我应该有一个标题框,我可以在其中包含按钮或文字。 该框应在左侧有一个图像框,在右侧有文本框。 两个方框都应该是相同的高度。
在文本框中,我应该可以放置buttons, text, links etc
。
整个事物的背景应该能够定制。
怎么做?
答案 0 :(得分:-1)
首先,如果你想问一个问题,其他人必须明白提问者究竟想要什么。我希望这样的事情是你所要求的。
.customizedBox {
border: 1px solid #111;
width: 500px;
height: 400px;
}
.header {
background-color: gray;
width: 100%;
height: 50px;
text-align: center;
}
.imageBox {
background-color: blue;
float: left;
width: 50%;
height: 350px;
}
.textBox {
background-color: green;
float: right;
width: 50%;
height: 350px;
}

<div class="customizedBox">
<div class="header">Header
</div>
<div class="imageBox">Image Box
</div>
<div class="textBox">Text Box
<button style="display: block;">Button</button>
<p>Paragraph</p>
<a href="#">A link</a>
</div>
</div>
&#13;