太美了!CSS style n(*≧▽≦*)n

BootStrap

BootStrap真的是个非常棒的前端框架 n(*≧▽≦*)n

Demos in BootStrap

使用bootstrap进行布局,可以获得更好的视觉体验

Learn more

 在这里显示效果不好(╬▔^▔)凸

<div class="jumbotron">

    <h1>Demos in BootStrap</h1>

    <p>使用bootstrap进行布局,可以获得更好的视觉体验</p>

    <p><a class="btn btn-primary btn-lg" role="button">Learn more</a></p>

</div>

 

效果如上面的部分

<div class="page-header">

    <h1>页头 <small>与内容形成分隔</small></h1>

</div>

 

class="alert alert-success" role="alert"
class="alert alert-info" role="alert"
class="alert alert-warning" role="alert"
class="alert alert-danger" role="alert"
Well done! You successfully read this important alert message.

Oh snap! You got an error!

Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

说明

样式分别有:success,info,warning,danger 直接写入class就可以获取想要的效果,下面附上带关闭按钮的代码。

<div class="alert alert-success alert-dismissible  fade in" role="alert">

    <button type="button" class="close" data-dismiss="alert">×</button>

    <strong>Well done!</strong> You successfully read <a href="#" class="alert-link">this important alert message</a>.

</div>

 

danger

class="bs-callout bs-callout-danger"

danger

class="bs-callout bs-callout-danger"

info

class="bs-callout bs-callout-info"

内部h4标签用作title,p标签用作content

metro

额外的添加bs-callout-metro就可以让提示框扁平化

60%
<div class="progress">

    <div class="progress-bar" role="progressbar" style="width: 60%;">

        60%

    </div>

</div>    

 

35% Complete (success)
20% Complete (warning)
10% Complete (danger)
<div class="progress">

    <div class="progress-bar progress-bar-success" style="width: 35%">

        <span class="sr-only">35% Complete (success)</span>

    </div>

    <div class="progress-bar progress-bar-warning progress-bar-striped active" style="width: 20%">

        <span class="sr-only">20% Complete (warning)</span>

    </div>

    <div class="progress-bar progress-bar-danger" style="width: 10%">

        <span class="sr-only">10% Complete (danger)</span>

    </div>

</div>

    

很帅是吧?进度动画和条纹(可以单独条纹不动,个人认为不好看)可以混搭的

进度条样式:progress-bar-success,progress-bar-info,progress-bar-warning,progress-bar-danger

通用写法:class="progress-bar progress-bar-warning progress-bar-striped active"

 

在 class="panel panel-default" 内的class="panel-body"里面添加内容

标题

这里是内容主体,标题放在 class="panel-heading" 里面

标题

class="panel panel-primary"

标题

class="panel panel-success"

标题

class="panel panel-info"
<div class="panel panel-default">

    <div class="panel-heading">

        <h3 class="panel-title">标题</h3>

    </div>

    <div class="panel-body">

        这里是内容主体,标题部分可以根据需求去掉

    </div>

</div>

 

就像这样...

有3个尺寸供选择

class="well" class="well well-lg" class="well well-sm"

 

胶囊式导航

给ul添加 .nav-pills 类,可以给选项卡标签另一种样式

 

切换状态

添加了 data-loading-text 之后,就可以使用 $.button("loading")$.button("reset") 来显示和重置状态.

 

效果见本站头部

@上位者的怜悯写的!!感觉好屌

太美了!

var slider = $("#homeBanner").slider({

    id: "homeBanner",

    imgs: [

        "http://i2.tietuku.com/e5859ff3e6487575.png",

        "http://i2.tietuku.com/884e69c2eb02316b.png",

        "http://i2.tietuku.com/f07bd295f4cdbd7a.png",

        "http://i2.tietuku.com/89e657a08f9f13f6.png",

        "http://i2.tietuku.com/0f8738e9cfbb9485.png",

        "http://i2.tietuku.com/462506e0ed7b0c25.png"

    ],

    scale: 5 / 2,

    border: true,

    x: 4,

    y: 3

});

 

js+bootstrap

还是根本停不下来~

基本样式

 

# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

条纹状表格

# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

带边框的表格

# First Name Last Name Username
1 Mark Otto @mdo
Mark Otto @TwBootstrap
2 Jacob Thornton @fat
3 Larry the Bird @twitter

代码调用:

<table class="table"><table class="table table-striped"><table class="table table-bordered">

.........

</table></table></table>

说明:可以额外为表格加上鼠标悬停,紧缩和状态

鼠标悬停:

只需在class上加上 .table-hover 即可让表格的每一行响应鼠标悬停状态。

# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

紧缩表格:

只需在class上加上 .table-condensed 即可让表格更加紧凑,单元格中的内部(padding)均会减半。

# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

紧缩表格:

只需在class上加上 .table-condensed 即可让表格更加紧凑,单元格中的内部(padding)均会减半。

# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

状态提示:

Class 描述
.active 鼠标悬停在行或单元格上时所设置的颜色
.success 标识成功或积极的动作
.warning 标识警告或需要用户注意
.danger 标识危险或潜在的带来负面影响的动作

方法一:使用js来实现:$(".slide-menu").affix({offset: {top:xxx} }); 这里的 top值 建议在初始化的时候动态获取

方法二:在想要浮动的标签加上 data-spy="affix" ,使用 data-offset-top="xx" 来让标签在什么高度开始浮动

注意: 无论哪一种方法,都要在style中添加 top:xxx 来设置浮动的位置

  • 太美了!CSS style n(*≧▽≦*)n

    某某回复:

    呵呵

    太美了!CSS style n(*≧▽≦*)n

    某某回复:

    呵呵

  • 太美了!CSS style n(*≧▽≦*)n

    XXX说:

    我也这么想 =。=

太美了!CSS style n(*≧▽≦*)n class="scale"

很简单,一句话了事

$('body').scrollspy({ target: '.slide-menu' }) 用滚动的元素,绑定要监听元素(.nav)的父元素

注意

scrollspy还有其它要注意的东西,但是本站没有用到就不赘述了.

 

 

 

本文转载自 @上位者的怜悯 ,我自个修改了下(写得太好了,不得不转~\(≧▽≦)/~)

 

无耻的求推荐:您有没有对本文章感兴趣呢?(正确答案:有✧ (≖ ‿ ≖)✧)

你可能感兴趣的:(style)