简体   繁体   中英

Why does my bootstrap grid looks different on stackoverflow and on localhost?

I clicked on "external library" and added the bootstrap library, but as you can see if you click on the run button, the rows are not displayed in one row.

 /* Optional theme */ @import url('//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css'); div { border: 1px solid red; } 
 <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> <div class="row"> <div class="col-sm-3"> Text </div> <div class="col-sm-3"> Text </div> <div class="col-sm-3"> Text </div> </div> 

If i execute the same code on my local machine then it looks like this: 在此处输入图片说明

That's because the view your looking at is too small and as bootstrap works it's getting re-sized one at a line. If you take a look in the full page view, you will see the following image :

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM