转载

Bootstrap 圆形图片

.img-circle:添加 border-radius:500px 来让整个图像变成圆形

语法:

 <img src="..." alt="..." class="img-circle"> 

案例:

  1. <!DOCTYPE html> 
  2. <html> 
  3. <head> 
  4.    <title>Bootstrap 实例 - 圆形图片</title> 
  5.    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet"> 
  6.    <script src="/scripts/jquery.min.js"></script> 
  7.    <script src="/bootstrap/js/bootstrap.min.js"></script> 
  8. </head> 
  9. <body> 
  10.  
  11. <img src="/wp-content/uploads/2014/06/download.png"  class="img-rounded"> 
  12.  
  13. </body> 
  14. </html> 

运行结果:

Bootstrap 圆形图片

正文到此结束
Loading...