欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

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

程序员文章站 2022-05-03 17:19:14
...
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:

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

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