首页 >web前端 >html教程 >CSSBox -一个纯CSS Lightbox代替_html/css_WEB-ITnose

CSSBox -一个纯CSS Lightbox代替_html/css_WEB-ITnose

WBOY
WBOY原创
2016-06-24 11:28:201139浏览

CSSBox

CSSBox -一个纯CSS Lightbox代替。An example page is available in the gh-pages branch, or online on GitHub Pages.

Why CSSBox?

  • Actually lightweight (903b including comments, 607b excluding comments, unminified!)
  • Centers the image
  • Adds a nice, realistic shadow to the image
  • Dims the background
  • Completely responsive, works on any screen size
  • Has a pretty fade in animation
  • Absolutely no JavaScript

Usage

Upload cssbox.css to your server and add a stylesheet link to it in your CSS.

Add your images like this:

<img  class="cssbox_thumb" tabindex=1 src="image_thumbnail.png" / alt="CSSBox -一个纯CSS Lightbox代替_html/css_WEB-ITnose" ><span class="cssbox_full"><img  src="image_full.png" / alt="CSSBox -一个纯CSS Lightbox代替_html/css_WEB-ITnose" ></span>

When a visitor clicks the tumbnail, the fullsize preview will appear in the center of the screen.

License

Creative Commons Zero 1.0

项目地址: https://github.com/TheLastProject/CSSBox

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn