How to use responsive features of bootstrap 2.0

前端 未结 5 1399
野趣味
野趣味 2021-01-29 20:08

I\'m using bootstrap 2.0 from twitter and unsure how to make it responsive.

  • How can I remove elements when in mobile/small screen mode?
  • How can I replace
5条回答
  •  悲哀的现实
    2021-01-29 20:21

    I've been playing with the responsive parts of bootstrap for the last few days, take a look at /less/responsive.less to get an idea of how you can utilize the responsive features of bootstrap.

    You basically look at the browser's width/height to determine which css properties to apply to the page. So, for example if you want to change h2 when the user is using a smaller device, you would do something like this:

    @media (max-width: 480px) {
        h2 { font-size: 15px; }
    }
    

    You can do this with any style you want to affect when the size of the screen changes.

    You can replace some elements by utilizing css replacement methods and then just have different styles affect things at different widths. Or you could use jquery or maybe response.js to do it. I'm still playing with this part of it.

提交回复
热议问题