Copy code The code is as follows:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>mask-layer</title> </head> <style type="text/css"> *{margin:0;padding: 0;} ul{margin:100px auto 0; width:200px;} img{border: 0 none;} li{background-color:#555;list-style: none; width: 146px; height: 220px;} a:hover{opacity: 0.6;} </style> <body> <ul> <li><a href=""><img src="upload/2022/web/64380cd7912397dd9e0581b65982b2b7d0a28707.jpg" alt="" /></a></li> </ul> </body> </html> Principle : add a background to li, the size of li is the size of the image, and change the transparency of a when a:hover |
<<: Analysis of MySQL crash recovery based on Redo Log and Undo Log
>>: This article summarizes the specific use of CSS two-column layout and three-column layout
Preface When a Linux is fully set up, you can use...
As a front-end novice, I tinkered with the front-e...
Several common paging methods: 1. Escalator metho...
MySQL UTF-8 encoding MySQL has supported UTF-8 si...
symptom I set a crontab task on a centos7 host, b...
Copy code The code is as follows: <BODY> //...
Here are some common MySQL commands for you: -- S...
This article shares the specific code of JavaScri...
Learn how to host your own website on Apache, a r...
Here is a case of modal box dragging. The functio...
Download Download address: https://dev.mysql.com/...
Table of contents What is Proxy Mode? Introducing...
Question How to access the local database in Dock...
With the popularization of 3G, more and more peop...
The box model specifies the size of the element b...