Main problem
我设法用W3 schools example制作了一个我想要放入文本的框,但我目前遇到的问题是,当我以较小的尺寸四处移动页面大小时,框的右侧粘在屏幕的末端,这会导致问题,例如,从移动设备查看.我也注意到,左侧的空间比右侧小. 如果您将窗口设置得足够小或 open the site on mobile
到目前为止,我已经try 用百分比或不同的像素大小改变文本框两侧的边距,但无论我做了什么更改,文本框仍然粘在右边.
我遇到问题的代码片段:
<div class="bodybox">
<p> according to all known laws of aviation there is no way that a bee should be able to fly. Its wings are too small to get its fat little body off the ground. the bee of course, flies anyways, because bees dont care what humans think is possible.
<br> Yellow black, yellow black, ooh black and yellow! Let's shake it up a little.
<br>Barry! Breakfast is ready!
<br>Coming!
</p>
</div>
.bodybox {
text-align: center;
background-color: #d19dfc;
width: 95%;
border: 5px solid black;
border-radius: 7px;
padding: 10px;
margin-left: 20px;
margin-right: 10px;
margin-top: 20px;
}
不要理会这篇令人畏缩的蜜蜂电影 playbook ,因为它是测试盒子边界的第一件事……