The top fixed div can be set to a semi-transparent effect

The top fixed div can be set to a semi-transparent effect

Copy code
The code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Top Fixed</title>
<style type="text/css">
html,body {overflow:hidden;margin:0px;width:100%;height:100%;}
.virtual_body {width:100%;height:100%;overflow-y:scroll;overflow-x:auto;}
.fixed_div {position:absolute;z-index:2008;top:0px;left:0px;right:16px;height:40px;background:#CCCCCC;border-bottom:3px inset;border-color:#006699;
//bottom:20px;
//border:1px solid red;
//border-style:inset;
//Translucent effect production
//filter:alpha(opacity=50);
//-moz-opacity:0.5;
//opacity:0.5;
//background:#666666;
}
</style>
</head>
<body>
<div class="fixed_div"><font color="red">Zhengzhou University</font></div>
<div class="virtual_body">
<div style="height:888px;">
<p>


Goodbye, I will definitely come back to see you!
</div>
</div>
</body>
</html>

The effect diagram is as follows:

<<:  Use of align-content in flex layout line break space

>>:  Steps for IDEA to integrate Docker to achieve remote deployment

Recommend

Nginx local directory mapping implementation code example

Sometimes you need to access some static resource...

Sample code for implementing the Olympic rings with pure HTML+CSS

Rendering Code - Take the blue and yellow rings a...

Vue implements drag progress bar

This article example shares the specific code of ...

Summary of uncommon js operation operators

Table of contents 2. Comma operator 3. JavaScript...

Command to view binlog file creation time in Linux

Table of contents background analyze method backg...

How to monitor Linux server status

We deal with Linux servers every day, especially ...

Detailed installation and configuration of Subversion (SVN) under Ubuntu

If you are a software developer, you must be fami...

Linux uses shell scripts to regularly delete historical log files

1. Tools directory file structure [root@www tools...

Navicat for MySQL 15 Registration and Activation Detailed Tutorial

1. Download Navicat for MySQL 15 https://www.navi...

How MLSQL Stack makes stream debugging easier

Preface A classmate is investigating MLSQL Stack&...

MySQL series of experience summary and analysis tutorials on NUll values

Table of contents 1. Test Data 2. The inconvenien...

Introduction to HTML method of opening link files using hyperlinks

a and href attributes HTML uses <a> to repr...