when learning bootstrap, I learned the page layout container class, which is used for fixed width and supports responsive layout, which is written when looking at the source code
.container {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container {
width: 1170px;
}
}
for width: 1170px; do not understand, if it is
when learning CSS-sharpdivdemo {
width: 1170px;
}
this should be the width of the content set, and the actual width of div needs to be added with padding,. But according to the effect, the width set in bootstrap directly sets the width of div to 1170px, which is contrary to CSS. I don"t know how to explain this?