私はdivを持っています:
<div class="frame" id="layer1"> ... </div>
スタイリングで:
.frame {
position: absolute;
width: 380px;
height: 280px;
overflow: hidden;
padding: 0;
margin: 0;
border: 0;
}
#layer1 { background-color: red; color: #fff; }
しかし、これらは私の結果です:
$(".frame").filter(":first").width(); // 384
$(".frame").filter(":first").outerWidth(); // 384
$(".frame").filter(":first").innerWidth(); // 384
パディングとマージンが 0 であるため、すべて同じであることは理解していますが、このデフォルトの 4px はどこから来たのでしょうか?