问题
Hey I find nowhere if I can change the default value of col-xs-12
I tried to put that but I all broken...
.col-xs-12 {
width: 600px;
}
If you are a doc where I can find the answer that will be really awesome !
Thx
回答1:
Never Change Bootstrap classes if you want to change any col-
class simply add one more class on same element and style that class, and your external CSS file should be loaded after bootstrap, so the css file has effect
Example:
<div class="col-xs-12 my-custom-width"></div>
<style>
.my-custom-width{
width:600px;
}
</style>
回答2:
You can use it this way
<div style="max-width:"600px;margin:0 auto">
<div class="col-xs-12"></div>
</div>
OR with media queries
@media (max-width: 600px) {
.col-xs-12{
max-width:600px !important;
}
}
来源:https://stackoverflow.com/questions/43001106/how-to-change-the-width-for-the-col-xs-bootstrap