当前位置:网站首页>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 .
边栏推荐
- This article is enough for learning advanced mysql
- 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)
- Moher College webmin unauthenticated remote code execution
- Sqli labs download, installation and reset of SQL injection test tool one of the solutions to the database error (# 0{main}throw in d:\software\phpstudy_pro\www\sqli labs-...)
- Leetcode 23. 合并K个升序链表
- How to reset IntelliSense in vs Code- How to reset intellisense in VS Code?
- 深入浅出:了解时序数据库 InfluxDB
- 神经网络入门(下)
- Leetcode 146. LRU cache
- The text box displays the word (prompt text) by default, and the text disappears after clicking.
猜你喜欢

L2-013 red alarm (C language) and relevant knowledge of parallel search

yolov5 xml数据集转换为VOC数据集

Email alarm configuration of ZABBIX monitoring system

Chrome is set to pure black

Text processing function sorting in mysql, quick search of collection

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)

谷歌官方回应:我们没有放弃TensorFlow,未来与JAX并肩发展

zabbix 5.0监控客户端

Tri des fonctions de traitement de texte dans MySQL, recherche rapide préférée

Oceanbase is the leader in the magic quadrant of China's database in 2021
随机推荐
The second session of the question swiping and punching activity -- solving the switching problem with recursion as the background (I)
1. Getting started with QT
OKR vs. KPI 一次搞清楚这两大概念!
Ecole bio rushes to the scientific innovation board: the annual revenue is 330million. Honghui fund and Temasek are shareholders
Collections in Scala
墨者学院-Webmin未经身份验证的远程代码执行
Leetcode (215) -- the kth largest element in the array
时序数据库 InfluxDB 2.2 初探
Advanced MySQL: Basics (5-8 Lectures)
Take you to master the formatter of visual studio code
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
Preliminary study on temporal database incluxdb 2.2
SQL注入测试工具之Sqli-labs下载安装重置数据库报错解决办法之一(#0{main}thrown in D:\Software\phpstudy_pro\WWW\sqli-labs-……)
BUUCTF(4)
Devops Practice Guide - reading notes (long text alarm)
Application of isnull in database query
L1-021 important words three times (5 points)
L1-023 output gplt (20 points)
PCIe knowledge points -010: where to get PCIe hot plug data
Mysql database - function constraint multi table query transaction