Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
198 views
in Technique[技术] by (71.8m points)

Bootstrap 3 Apply CSS on Mobile View Only

I' am using Bootstrap 3, In the mobile view I would like to apply some CSS to fix up some bugs on mobile view. I have looked to documentations and Google it. I' am can't seem to find any clue on it.

Is it possible?

question from:https://stackoverflow.com/questions/19827236/bootstrap-3-apply-css-on-mobile-view-only

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Just use the appropriate media queries in your CSS, eg

@media (max-width: 767px) {
    /* CSS goes here */
}

Bootstrap defines the following widths

  • Extra small devices (phones, less than 768px)
  • Small devices (tablets, 768px and up)
  • Medium devices (desktops, 992px and up)
  • Large devices (large desktops, 1200px and up)

See http://css-tricks.com/css-media-queries/ for some more information on media queries.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...