标签: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、效果
标签:12px ext boot title height code htm 冲突 class
原文地址:http://www.cnblogs.com/mengfangui/p/6830003.html