BootStrap辅助样式

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!--以移动设备为优先,user-scalable=no禁止用户缩放-->
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    <title>Document</title>
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <script src="bootstrap/js/jquery.min.js"</script>
    <script src="bootstrap/js/bootstrap.min.js"</script>
</head>
<body>
<div class="container-fluid" style="background: #fff";>
    <p>I learned the value of hard work by working hard.</p>
    <p class="text-muted">I learned the value of hard work by working hard.</p>
    <p class="text-primary">I learned the value of hard work by working hard.</p>
    <p class="text-success">I learned the value of hard work by working hard.</p>
    <p class="text-info">I learned the value of hard work by working hard.</p>
    <p class="text-warning">I learned the value of hard work by working hard.</p>
    <p class="text-danger">I learned the value of hard work by working hard.</p>
</div>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!--以移动设备为优先,user-scalable=no禁止用户缩放-->
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    <title>Document</title>
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <script src="bootstrap/js/jquery.min.js"</script>
    <script src="bootstrap/js/bootstrap.min.js"</script>
</head>
<body>
<div class="container-fluid" style="background: #fff";>
    <p>I learned the value of hard work by working hard.</p>
    <p class="text-muted">I learned the value of hard work by working hard.</p>
    <p class="text-primary">I learned the value of hard work by working hard.</p>
    <p class="text-success">I learned the value of hard work by working hard.</p>
    <p class="text-info">I learned the value of hard work by working hard.</p>
    <p class="text-warning">I learned the value of hard work by working hard.</p>
    <p class="text-danger">I learned the value of hard work by working hard.</p>
    <p class="text-primary bg-success">I learned the value of hard work by working hard.</p>
    <p class="text-success bg-info">I learned the value of hard work by working hard.</p>
    <p class="text-info bg-warning">I learned the value of hard work by working hard.</p>
    <p class="text-warning bg-danger">I learned the value of hard work by working hard.</p>
    <p class="text-danger bg-primary">I learned the value of hard work by working hard.</p>
</div>
</body>
</html>

辅助类浮动

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!--以移动设备为优先,user-scalable=no禁止用户缩放-->
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    <title>Document</title>
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <script src="bootstrap/js/jquery.min.js"</script>
    <script src="bootstrap/js/bootstrap.min.js"</script>
    <style type="text/css" media="screen">
        .top
        {
            width:500px;
            border:1px solid blue;
            margin: 10px auto;
            overflow: hidden;/*使获得自然高*/
        }
        .pull-left
        {
            width: 200px;
            height: 200px;
            background: red;
        }
        .pull-right
        {
            width: 200px;
            height: 200px;
            background: red;
        }
    </style>
</head>
<body>
<div class="container-fluid" style="background: #fff";>
    <p>I learned the value of hard work by working hard.</p>
    <p class="text-muted">I learned the value of hard work by working hard.</p>
    <p class="text-primary">I learned the value of hard work by working hard.</p>
    <p class="text-success">I learned the value of hard work by working hard.</p>
    <p class="text-info">I learned the value of hard work by working hard.</p>
    <p class="text-warning">I learned the value of hard work by working hard.</p>
    <p class="text-danger">I learned the value of hard work by working hard.</p>
    <p class="text-primary bg-success">I learned the value of hard work by working hard.</p>
    <p class="text-success bg-info">I learned the value of hard work by working hard.</p>
    <p class="text-info bg-warning">I learned the value of hard work by working hard.</p>
    <p class="text-warning bg-danger">I learned the value of hard work by working hard.</p>
    <p class="text-danger bg-primary">I learned the value of hard work by working hard.</p>
    <!--加小三角形-->
    <span class="caret"></span>
    <!--辅助类浮动-->
    <div class="top clearfix"><!--clearfix清除浮动,加在父盒子上面-->
        <div class="pull-left">
            我在左边
        </div>
        <div class="pull-right">
            我在右边
        </div>
    </div>
</div>
</body>
</html>

时间: 2024-08-09 16:02:36

BootStrap辅助样式的相关文章

Bootstrap基础2(图片与辅助样式)

<!DOCTYPE html><html lang="zh-CN"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <title>Boot

Bootstrap3学习笔记:辅助样式

<!DOCTYPE html> <html> <head> <meta charst="gb2312"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- user-scalable=no 在移动设备浏览器上,禁止用户缩放(zooming) --> <meta name="viewport&q

解决了部署到Heroku时无法显示bootstrap CSS样式的问题

今天使用了bootstrap-sass进行布局,真的很好用,据说是tweet 开源的一个东东,本地一切都OK的时候欢喜的git push heroku后,发现bootstrap css的样式并没有预期中的显示出来,感觉还是挺沮丧,但是有问题就要解决,于是抱着技术问题问Google的态度,搜索了下,在 stackoverflow上找到了解决方法,不得不说stackoverflow真是个好东西,我的问题大部分都是在那上面解决的. 原文: I could not view the site with

在bootstrap ace样式框架上修改的后台管理型模板

后台管理模板开始用frameset布局,但是有时候会遮挡比如上面导航或者左边导航的二级三级弹出菜单,因为宽度被限制了,所以有时候就用easyui或者ext的,但是样式不好看,然后看到了bootstrap ace的后台管理模板,觉得挺漂亮的,所以拿来修改了下,以前是单页型的页面,每个页面都有导航什么的,现在把导航做成公共的了,然后在顶部添加了tab页,双击tab页关闭当前页面,tab页里的内容能够自适应了,然后顺便排列了下表单,差不多就这样,拿出来共享下,觉得不错的给个赞哈..嘿嘿. 下载地址:h

Bootstrap 基本样式

基本样式 <head> <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script> <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.js"></script> <link href="http://libs.baidu.com/boot

bootstrap 全局样式设置

HTML <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>全局样式</title> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/boo

bootstrap基础样式使用

<small> 为了给段落添加强调文本,则可以添加 class="lead" <small>本行内容是在标签内</small><br> <strong>本行内容是在标签内</strong><br> <em>本行内容是在标签内,并呈现为斜体</em><br> <p class="text-left">向左对齐文本</p> &l

基于Metronic4.1的Bootstrap脚本样式说明

虽说Bootstrap作为当下最流行的响应式的UI,但是对于一些在Bootstrap基础上扩展的UI的资料算是很之又少.这里楼主结合这一个月的辛酸把那些脚本跟样式整理一下下... 关于Metronic4.1的相关信息也只能从Metronic4.1的Demo中扣出来,首先看下如下样式: <!-- BEGIN GLOBAL MANDATORY STYLES --> <link href="@Url.StaticFile("/assets/global/plugins/fo

Bootstrap -- 按钮样式与使用

1. 可用于<a>, <button>, 或 <input> 元素的按钮样式 按钮样式使用: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>My Test bootstrap</title> &l