container / pull-left

本文介绍了CSS中元素的浮动属性及其使用方法,并通过实例展示了如何利用!important来提高CSS规则的优先级,防止被后续样式覆盖。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

        <div class="container">
            <h2>实例</h2>
            <div class="pull-left">元素浮动到左侧</div>
            <div class="pull-right">元素浮动到右侧</div>
        </div>

.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px;}

.pull-left{float:left !important;}

 

!important会提升该条规则的优先级,如果有如下2条规则
.pull-left{color:red !important;}
.pull-left{color:green;}
这样pull-left文字的颜色就是红色
如果不加!important就会被第二条的规则覆盖显示为绿色了

 

转载于:https://www.cnblogs.com/chrisghb8812/p/5708820.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" id="extr-page"> <head> <base href="http://10.50.64.10:8080/"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>VionTool MES系统登录</title> <link rel="shortcut icon" href="/staticResource/images/vt_icon.ico" type="image/x-icon"> <link href="/staticResource/css/login.css?v=20250609015108" rel="stylesheet" rev="stylesheet" type="text/css" media="all"/> <link href="/staticResource/css/demo.css?v=20250609015108" rel="stylesheet" rev="stylesheet" type="text/css" media="all"/> <link rel="stylesheet" type="text/css" media="screen" href="/staticResource/vendor/css/bootstrap.min.css?v=20250609015108"> <link rel="stylesheet" type="text/css" media="screen" href="/staticResource/vendor/css/smartadmin-production.min.css?v=20250609015108"> <script src="/staticResource/scripts/jquery/jquery-1.10.2.min.js?v=20250609015108"></script> <link href="/staticResource/styles/jet-login.css?v=20250609015108" rel="stylesheet"/> <link href="/staticResource/styles/font-awesome.min.css?v=20250609015108" rel="stylesheet"/> <script src="/staticResource/scripts/plugins/jquery.md5.js?v=20250609015108"></script> <script src="/staticResource/scripts/plugins/cookie/jquery.cookie.js?v=20250609015108"></script> <script src="/staticResource/scripts/plugins/dialog/dialog.js?v=20250609015108"></script> <script src="/staticResource/scripts/utils/jet-ui.js?v=20250609015108"></script> <link rel="stylesheet" href="http://10.50.64.10:8080//staticResource/vt/js/bootstrap-select/bootstrap-select.min.css?v=20250609015108"/> <script type="text/javascript" src="http://10.50.64.10:8080//staticResource/vt/js/bootstrap-select/bootstrap-select.min.js?v=20250609015108"></script> <script type="text/javascript" src="http://10.50.64.10:8080//staticResource/vt/js/vt-ui.js?v=20250609015108"></script> <script type="text/javascript" src="http://10.50.64.10:8080//staticResource/js/com/visiontool/system/loginInfo/login.js?v=20250609015108"></script> <link rel="stylesheet" href="http://10.50.64.10:8080//staticResource/vt/js/vt-ui.css?v=20250609015108"/> </head> <body style="overflow-x: hidden;"> <header id="header"> <div id="logo-group"> <span id="logo"> <img src="/staticResource/vendor/img/logo.png" alt="江西鸿泰模具股份有限公司"> </span> </div> </header> <div id="main" role="main"> <!-- MAIN CONTENT --> <div id="content" class="container"> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-5 col-lg-6 hidden-xs hidden-sm"> <h1 class="txt-color-red login-header-big">VisionTool MES 生产制造系统</h1> <div class="hero"> <img src="/staticResource/vendor/img/demo/loading.jpg" class="pull-right display-image" alt="" style="width:380px"> </div> </div> <div class="col-xs-12 col-sm-12 col-md-5 col-lg-4"> <div class="well no-padding"> <form action="index.html" id="login-form" class="smart-form client-form"> <header>系统登录认证</header> <fieldset> <section> <label class="label username">用户名</label> <label class="input"> <i class="icon-append fa fa-user"></i> <input id="username" type="username" name="username" placeholder="用户名"> <b class="tooltip tooltip-top-right"><i class="fa fa-user txt-color-teal"></i>请输入用户名</b></label> </section> <section> <label class="label">密码</label> <label class="input"> <i class="icon-append fa fa-lock"></i> <input id="password" type="password" name="password" placeholder="密码"> <b class="tooltip tooltip-top-right"><i class="fa fa-lock txt-color-teal"></i> 请输入密码</b> </label> </section> <section> <label class="label">班次</label> <select id="shiftClass" name="shiftClass" class="selectpicker"></select> </section> <div class="note"> <a onclick="alert('请联系信息管理部:') ">忘记密码了?</a> </div> </section> </fieldset> <footer> <button id="btnlogin" type="button" class="btn btn-primary">登录</button> </footer> </form> </div> </div> </div> </div> </div> <div class="copyright" style="position: absolute; margin-left: 10px ;height: 50px;text-align: center;margin-left: 10px;right: 0;z-index: 10000;bottom: 0;"> <br> <p style="font-size: 15px">Copyright © 2019. 江西鸿泰模具股份有限公司 </p> </div> <script src="/staticResource/vendor/js/bootstrap/bootstrap.min.js?v=20250609015108"></script> </body> </html> 这是我的网页的login_page 怎么提取这个的CSRF令牌
06-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值