bootstrap使用(关于框架搭建)

通过网络引用bootstrap代码(复制粘贴可直接使用)

  <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

在引入bootstrap之后,在框内容的父级div添加class

    container    效果是该div自带宽度,内容居中(使用bootstrap时,再使用定位时有奇效)

    row             消除bootstrap自带的15px的边距

    col-md-3       md是指pc端(电脑端)  3是占12份中的三份

    col-xs-12       xs指手机端  12是指12份全占,也就是一行

    

   

    

下部有一个左右滑动的滚动条,
这是因为在bootstrap中row默认有

margin-left:-15px;

margin-right:-15px;

两个属性,
所以我们可以用

<div class="row" style="margin-left:0px; margin-right:0px;"></div>


将其覆盖掉,然后滚动条就不见了

水平居中
<div class="text-center">

<ul class="pagination pagination">

<li><a href="#">&laquo;第一页</a></li>

<li><a href="#">1</a></li>

<li><a href="#">最后一页&raquo;</a></li>

</ul>

</div>

鼠标控制隐藏域的显示      class名字 > 有子级写没有子级就不写箭头 >  :hover    (空格表示执行后续代码)    class名字{   display:block }    ####可以设置其他样式等(如字体颜色,字体大小等)

原文地址:https://www.cnblogs.com/sword082419/p/9356016.html