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

getdata table table data join mysql method

public function json_product_list($where, $order)...

Example code for implementing bottom alignment in multiple ways with CSS

Due to the company's business requirements, t...

Detailed explanation of software configuration using docker-compose in linux

Preface This article will share some docker-compo...

Mysql command line mode access operation mysql database operation

Usage Environment In cmd mode, enter mysql --vers...

Detailed explanation of Linux environment variable configuration strategy

When customizing the installation of software, yo...

How to open ports to the outside world in Alibaba Cloud Centos7.X

In a word: if you buy a cloud server from any maj...

Summary of tips for making web pages

Preface This article mainly summarizes some of th...

Vue implements multiple selections in the bottom pop-up window

This article example shares the specific code of ...

How to enable remote access permissions in MYSQL

1. Log in to MySQL database mysql -u root -p View...

About the processing of adaptive layout (using float and margin negative margin)

Adaptive layout is becoming more and more common i...

Solve the problem of inconsistent front and back end ports of Vue

Vue front and back end ports are inconsistent In ...

Detailed explanation of MLSQL compile-time permission control example

Preface The simple understanding of MySQL permiss...

Javascript Basics: Detailed Explanation of Operators and Flow Control

Table of contents 1. Operator 1.1 Arithmetic oper...