纽扣扣错了可以重扣,但人生不行,除非你选对了人生道路。早上起床你一句早安,晚上睡觉一句晚安。对我来说这就是极有意义的一天。
本文实例为大家分享了Bootstrap缩略图与警告框的具体代码,供大家参考,具体内容如下
<html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap</title> <link rel="stylesheet" rel="nofollow noopener noreferrer" href="css/bootstrap.css" rel="external nofollow" /> </head> <body> <div class="container"> <div class="row"> <div class="col-lg-3"><!--thumbnail为缩略图,外围加了边框并变为圆角--> <a rel="nofollow noopener noreferrer" href="//www.haodaima.com" class="thumbnail"> <img src="../logo.jpg"/> </a> </div> <div class="col-lg-3"> <a rel="nofollow noopener noreferrer" href="//www.haodaima.com" class="thumbnail"> <img src="../logo.jpg"/> </a> </div> <div class="col-lg-3"> <a rel="nofollow noopener noreferrer" href="//www.haodaima.com" class="thumbnail"> <img src="../logo.jpg"/> </a> </div> <div class="col-lg-3"> <a rel="nofollow noopener noreferrer" href="//www.haodaima.com" class="thumbnail"> <img src="../logo.jpg"/> </a> </div> </div> <div class="row"> <div class="col-lg-4"> <div class="thumbnail"><!--给父级加上thumbnail--> <a rel="nofollow noopener noreferrer" href="//www.haodaima.com"> <img src="../logo.jpg"/> </a> <div class="caption"><!--可以增加图片与文字之间的距离--> <h3>水果</h3> <p>苹果梨橘子葡萄柚子香蕉苹果梨橘子葡萄柚子香蕉</p> </div> </div> </div> </div> </div> <div class="container"> <div class="row"> <p class="alert alert-danger">这里是一个警告框!!!<button class="close" data-dismiss="alert">×</button></p><!--data-dismiss="alert"使其与js进行交互--> </div> </div> <script src="js/jquery-2.1.0.js"></script> <script src="js/bootstrap.js"></script> </body> </html>
效果图:
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。