当前位置:网站首页>Mouse over to change the transparency of web page image
Mouse over to change the transparency of web page image
2022-07-04 08:10:00 【Little Zeng with nowhere to put】
Tools :HBuilder X 2.8.8、 Google browser .
One 、 The project catalogue is as follows :
Two 、 To write html Code and style css file
homework.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>29 Section floating and positioning operation </title>
<link rel="stylesheet" type="text/css" href="css/homework.css"/>
</head>
<body>
<div class="pro_list">
<!-- Fast generation method :(div.item>img)*6+Tab -->
<div class="item">
<img src="img/img01.jpg" alt="">
<div class="box5">
</div>
</div>
<div class="item">
<img src="img/img02.jpg" alt="">
<div class="box5">
</div>
</div>
<div class="item">
<img src="img/img03.jpg" alt="">
<div class="box5">
</div>
</div>
<div class="item">
<img src="img/img04.jpg" alt="">
<div class="box5">
</div>
</div>
<div class="item">
<img src="img/img05.jpg" alt="">
<div class="box5">
</div>
</div>
<div class="item">
<img src="img/img06.jpg" alt="">
<div class="box5">
</div>
</div>
</div>
</body>
</html>
homework.css
.pro_list{
width: 75rem;
border: 0.0625rem solid pink;
overflow: hidden;
}
.item{
width: 23.75rem;
height:14.375rem;
float: left;
position: relative;
}
.box5{
/* 100% It means the same width and height as the parent class */
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
/* rgba(,,,) The first is the red value , The second is the green value , The third is the blue value ,1~255 The fourth is transparency alpha Color space */
position: absolute;
top:0;
left:0;
}
.item:hover .box5{
/* hover There must be a space after */
background-color: rgba(0,0,0,0.2);
}3、 ... and 、 Run the renderings .
边栏推荐
- System architecture design of circle of friends
- L1-022 odd even split (10 points)
- Moher college phpMyAdmin background file contains analysis traceability
- Set and modify the page address bar icon favicon ico
- 弈柯莱生物冲刺科创板:年营收3.3亿 弘晖基金与淡马锡是股东
- [test de performance] lire jmeter
- deno debugger
- Common components of flask
- Practice (9-12 Lectures)
- How to set multiple selecteditems on a list box- c#
猜你喜欢

Wechat has new functions, and the test is started again

一文了解数据异常值检测方法

Oceanbase is the leader in the magic quadrant of China's database in 2021

Moher College webmin unauthenticated remote code execution

墨者学院-PHPMailer远程命令执行漏洞溯源

Oracle stored procedures and functions
![[test de performance] lire jmeter](/img/c9/25a0df681c7ecb4a0a737259c882b3.png)
[test de performance] lire jmeter

Go learning notes - constants

Take you to master the formatter of visual studio code

一文了解數據异常值檢測方法
随机推荐
L1-022 odd even split (10 points)
Put a lantern on the website during the Lantern Festival
JVM中堆概念
How to improve your system architecture?
Div hidden in IE 67 shows blank problem IE 8 is normal
神经网络入门(下)
Would you like to go? Go! Don't hesitate if you like it
Activiti common operation data table relationship
Moher college phpMyAdmin background file contains analysis traceability
团体程序设计天梯赛-练习集 L1-006 连续因子
BUUCTF(3)
Introduction to neural network (Part 2)
How to use C language code to realize the addition and subtraction of complex numbers and output structure
Take you to master the formatter of visual studio code
谷歌官方回应:我们没有放弃TensorFlow,未来与JAX并肩发展
运动【跑步 01】一个程序员的半马挑战:跑前准备+跑中调整+跑后恢复(经验分享)
PCIe knowledge points -010: where to get PCIe hot plug data
Group programming ladder race - exercise set l1-006 continuity factor
Azure ad domain service (II) configure azure file share disk sharing for machines in the domain service
The text box displays the word (prompt text) by default, and the text disappears after clicking.