码迷,mamicode.com
首页 > 其他好文 > 详细

Bootstrap新手常见问题

时间:2016-03-07 20:39:04      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:

题记

bootstrap这个开源的UI库确实很方便,用了两日,觉得不错,但也有些问题比较头疼!

 

主题

1、怎么使用?怎么定制?下面是一个范例,修改了navbar的颜色,重新设置了select控件的默认长度

<link href="../static/bootstrap/css/bootstrap.css" rel="stylesheet"/>
<script src="../static/bootstrap/js/bootstrap.min.js"/>
<style>
body {
    padding-top: 45px;
}
.navbar-inverse .navbar-inner {
    background: #0C7854;
    background-image: -webkit-linear-gradient(top, #0D8059, #0B6E4D);
}
.navbar .nav > li > a {
    color: #DDD;
}
.navbar .nav .active > a, .navbar .nav .active > a:hover {
    background-color: #0B6E4D;
}

.navbar-inner .brand{
    color: #ffffff;
}

select{
    width:auto;
}
</style>

 

2、把公共的html部分提取出来,作为模板引入,比如navbar等

$ .get("../common/head.html",function(data){
     $("#floatDiv").html(data);
});
<div class="navbar navbar-inverse navbar-fixed-top" id="floatDiv"></div>

Bootstrap新手常见问题

标签:

原文地址:http://www.cnblogs.com/leeshine-luo/p/5251692.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!