0
注意如何使用引導程序時,容器DIV中的行格有左邊距「出現」的div容器外(左旁是黃色部分):如何使左邊距「出現」在容器div之外?
我試圖複製這個使用下面的代碼行爲:
<!DOCTYPE html>
<html>
<head>
<style>
#div1
{
width: 500px;
height: 400px;
border: 1px solid black;
margin-left: auto;
margin-right: auto;
}
#div2
{
width: 500px;
height: 200px;
background-color: red;
margin-right: 100px;
margin-left: 100px;
}
</style>
</head>
<body>
<div id="div1">
<div id="div2">
</div>
</div>
</body>
</html>
但它沒有工作(左旁留在容器DIV中):
自舉使用負值對'.row'左/右邊緣 –