Bootstrap3基礎 input-group glyphicon 輸入框組與可愛的glyphicon圖標
阿新 • • 發佈:2018-01-14
str new name container 用戶 友情鏈接 jquer icon圖標 targe
禮悟:
公恒學思合行悟,尊師重道存感恩。葉見尋根三返一,江河湖海同一體。
虛懷若谷良心主,願行無悔給最苦。讀書鍛煉養身心,誠勸且行且珍惜。
ide:visual studio 2017
browser:Firefox / Chrome
bootstrap:3.3.7
代碼
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> <!-- 頁面的寬度與設備屏幕的寬度一致 --> <meta name="viewport" content="width=device-width"> <!-- 初始縮放比例 1:1,沒有橫線滾動的效果 --> <meta name="viewport" content="initial-scale=1"> <!-- 禁止用戶縮放 --> <meta name="viewport" content="user-scalable=no"> <!-- 引入外部bootstrap的css文件(壓縮版) --> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> <!-- NO.1 先引入jQuery文件(壓縮版) --> <script src="bootstrap/js/jquery.min.js"></script> <!-- NO.2 再引入js文件(壓縮版) --> <script src="bootstrap/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <form> <!-- 最開始,我是<span class="input-group-addon glyphicon glyphicon-envelope"></span> 結果出現了錯位的情況。。。完全不知道該如何解決這種Bug 註意:這個span的嵌套,妙呀! https://v3.bootcss.com/components/#glyphicons 註:<span class="glyphicon glyphicon-envelope"></span> 裏面不要加內容 --> <div class="form-group input-group"> <span class=""><span class="glyphicon glyphicon-envelope"></span> 郵箱</span> <input type="search" name="sc" id="sc" class="form-control" /> </div> <hr /> <div class="form-group input-group"> <span class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span> 郵箱</span> <input type="search" name="sc" id="scNew" class="form-control" /> </div> </form> <span class="glyphicon glyphicon-apple">s</span> </div> </body> </html>
效果
2018-01-14
請看下圖
友情鏈接:http://glyphicons.com/
祝願圖標做的越來越漂亮。
Bootstrap,優秀的前端開源框架,值得學習。
學習資源:v3.bootcss.com + itcast和itheima視頻庫 + 清凈的心地。如果您有公開的資源,可以分享給我的話,用您的資源學習也可以。
博文是觀看視頻後,融入思考寫成的。博文好,是老師講得好。博文壞,是 給最苦 沒認真。
Bootstrap3基礎 input-group glyphicon 輸入框組與可愛的glyphicon圖標