It feels pretty good to create an album with pure CSS3. Here we will share with you the most important thing is that we didn't use a line of js. This is the highlight. Today, we accidentally found another example in the computer, I feel that the results are good. I don't remember when I downloaded them. I haven't been on w3cfuns for a long time. I miss the days of studying the front-end and I will share them with you.
:
The results are not very good. The most important thing is that a line of js is not used, which is the highlight.
First look at the html file:
Brief description:
1. li in ul determines the number of photos.
2. ul uses the float: right, width: 140px style to display the image in the right area of the album.
3. the float: left of li enables li to float left. The position of p in the large image in li is absolute, which is located based on p # gallary. By default, only the first display is used.
4. When the mouse moves over li, the transparency of li span img is changed and the display of li p is displayed.
The following is the css file:
The Code is as follows:
Css does not have any complicated styles, so it is not described. In addition, I introduced a reset style css and reset.css in html. You can also reset the style as you like:
The Code is as follows:
html, body, p, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend{ margin: 0; padding: 0; font-size: 100%; border: 0; outline: 0; background: transparent; } ol, ul { list-style: none; } blockquote, q { quotes: none; } :focus { outline: 0; } table { border-collapse: collapse; border-spacing: 0; }