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

消除2个按钮之间1px细节引起的冲突

时间:2017-05-09 13:43:43      阅读:103      评论:0      收藏:0      [点我收藏+]

标签:12px   ext   boot   title   height   code   htm   冲突   class   

1、代码

<!doctype html>
<html lang="en">

    <head>
        <meta charset="UTF-8" />
        <title>消除2个按钮之间1px细节引起的冲突</title>
        <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
        <style type="text/css">
            /*源代码解读*/
            
            .pagination>li>a {
                position: relative;
                /*设置浮动*/
                float: left;
                padding: 6px 12px;
                /*设置间距*/
                margin-left: -1px;
                line-height: 1.42857143;
                color: #337ab7;
                text-decoration: none;
                background-color: #fff;
                border: 1px solid #ddd;
            }
        </style>
    </head>

    <body>
        <nav aria-label="Page navigation">
            <ul class="pagination">
                <li>
                    <a href="#" aria-label="Previous">
                        <span aria-hidden="true">?</span>
                    </a>
                </li>
                <li>
                    <a href="#">1</a>
                </li>
                <li>
                    <a href="#">2</a>
                </li>
                <li>
                    <a href="#">3</a>
                </li>
                <li>
                    <a href="#">4</a>
                </li>
                <li>
                    <a href="#">5</a>
                </li>
                <li>
                    <a href="#" aria-label="Next">
                        <span aria-hidden="true">?</span>
                    </a>
                </li>
            </ul>
        </nav>
    </body>

</html>

 

2、效果

技术分享

 

消除2个按钮之间1px细节引起的冲突

标签:12px   ext   boot   title   height   code   htm   冲突   class   

原文地址:http://www.cnblogs.com/mengfangui/p/6830003.html

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