Sample code for implementing image drawer effect with CSS3

Sample code for implementing image drawer effect with CSS3

As usual, let’s first post the picture effect:

The principle of this effect is very simple: as long as you have the knowledge of CSS3 animation and transition, no JS code is needed;

HTML code:

<div>
        <ul id="list">
            <li>
                <a href="">International beauty preview</a>
                <img src="images/1.jpg" />
            </li>
            <li>
                <a href="">Goddess Standard Discussion</a>
                <img src="images/2.jpg" />
            </li>
            <li class="select">
                <a href="">Even foodies can lose weight the more they eat</a>
                <img src="images/3.jpg" />
            </li>
            <li>
                <a href="">Dress grabs headlines</a>
                <img src="images/4.jpg" />
            </li>
            <li>
                <a href="">Gong San Heroine Beauty Showdown</a>
                <img src="images/5.jpg" />
            </li>
        </ul>
    </div>

CSS code:

*{ margin:0;padding:0; }
    ul{ list-style:none; }
    a{ font-size:16px;text-decoration:none;color:#666; }
    div{ width:300px;margin:20px auto; }
    #list li{ line-height:40px;height:40px;background:#efefef;text-indent:1em; margin-bottom:3px;overflow:hidden;-webkit-transition:height 0.3s ease;-moz-transition:height 0.3s ease-ms-transition:height 0.3s ease;-o-transition:height 0.3s ease;transition:height 0.3s ease;}
    #list li img{ width:300px;height:200px;}
    #list li:nth-child(1){height:240px;background:#F36;}
    #list li:nth-child(1) a{ color:#fff; }
    #list:hover li{ height:40px;background:#efefef; }
    #list:hover li a{color:#666;}
    #list li:hover{ height:240px; background:#F36;}
    #list li:hover a{ color:#fff; }

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

<<:  Basic principles of MySQL scalable design

>>:  Detailed explanation of the deployment process of Docker Alibaba Cloud RocketMQ 4.5.1

Recommend

Summary of Problems in Installing MySQL 5.7.19 under Linux

The first time I installed MySQL on my virtual ma...

Teach you how to install mysql database on Mac

Download MySQL for Mac: https://downloads.mysql.c...

Apache Calcite code for dialect conversion

definition Calcite can unify Sql by parsing Sql i...

How to encapsulate axios in Vue

Table of contents 1. Installation 1. Introduction...

How to uninstall MySQL 8.0 version under Linux

1. Shut down MySQL [root@localhost /]# service my...

Axios cancels repeated requests

Table of contents Preface 1. How to cancel a requ...

Detailed explanation of Promises in JavaScript

Table of contents Basic usage of Promise: 1. Crea...

Detailed explanation of vue simple notepad development

This article example shares the specific code of ...

Tutorial on logging into MySQL after installing Mysql 5.7.17

The installation of mysql-5.7.17 is introduced be...

MySQL 8.0.12 Quick Installation Tutorial

The installation of MySQL 8.0.12 took two days an...

Ajax jquery realizes the refresh effect of a div on the page

The original code is this: <div class='con...

HTML hyperlinks explained in detail

Hyperlink Hyperlinks are the most frequently used ...

uni-app implements NFC reading function

This article shares the specific code of uni-app ...

Notes on upgrading to mysql-connector-java8.0.27

Recently, an online security scan found a vulnera...