当前位置:网站首页>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 .
边栏推荐
- Common components of flask
- deno debugger
- L1-028 judging prime number (10 points)
- I was pressed for the draft, so let's talk about how long links can be as efficient as short links in the development of mobile terminals
- Easy to understand: understand the time series database incluxdb
- L1-027 rental (20 points)
- L1-024 the day after tomorrow (5 points)
- Example analysis of C # read / write lock
- Conversion of yolov5 XML dataset to VOC dataset
- 墨者学院-PHPMailer远程命令执行漏洞溯源
猜你喜欢
Moher college phpMyAdmin background file contains analysis traceability
【Go基础】2 - Go基本语句
Project 1 household accounting software (goal + demand description + code explanation + basic fund and revenue and expenditure details record + realization of keyboard access)
Chrome is set to pure black
[network security] what is emergency response? What indicators should you pay attention to in emergency response?
Système de surveillance zabbix contenu de surveillance personnalisé
时序数据库 InfluxDB 2.2 初探
Text processing function sorting in mysql, quick search of collection
Linear algebra 1.1
Oracle stored procedures and functions
随机推荐
Add log file to slim frame - PHP
Difference between static method and non static method (advantages / disadvantages)
[Gurobi] 简单模型的建立
Oceanbase is the leader in the magic quadrant of China's database in 2021
Oracle-存储过程与函数
Set and modify the page address bar icon favicon ico
If the array values match each other, shuffle again - PHP
线性代数1.1
Google's official response: we have not given up tensorflow and will develop side by side with Jax in the future
The frost peel off the purple dragon scale, and the xiariba people will talk about database SQL optimization and the principle of indexing (primary / secondary / clustered / non clustered)
Leetcode (215) -- the kth largest element in the array
System architecture design of circle of friends
Activiti常见操作数据表关系
Example analysis of C # read / write lock
Figure guessing game
Système de surveillance zabbix contenu de surveillance personnalisé
MYCAT middleware installation and use
Heap concept in JVM
yolov5 xml数据集转换为VOC数据集
SSRF vulnerability exploitation - attack redis