我有以下的HTML5页面(在Windows Store应用):使用CSS3 textarea的布局利润率
<div>
<textarea id="wideBox" class="wideInput"></textarea>
<textarea id="small1" class="narrowInput"></textarea>
<textarea id="small2" readonly class="narrowInput"></textarea>
</div>
下面CSS:
.wideBox {
width: 100%;
box-sizing: border-box;
opacity: 80;
height: 200px;
background: -ms-linear-gradient(top, #213A4F, #1a82f7);
}
.narrowInput {
width: 50%;
box-sizing: border-box;
height: 200px;
float: left;
padding: 5px;
background: -ms-radial-gradient(bottom, #6BBEC7, #1a82f7);
}
那我以后的影响是单个宽文本框与两个相同大小的文本区域下面。
这是行不通的,但是,较小的文本框只是合并在一起。为了抵消这一点,我尝试引入1px
的余量,但是,这会将第二个较小的文本框推到下一行。
我也尝试在框中添加边框,但无济于事。
如何在不改变页面整体布局的情况下得到间隙或轮廓的效果?
你'.wideBox',这就是你的'id'的名称。在你的css中将它改为'.wideInput' – ashley 2013-02-19 08:48:25