1.html part Copy code The code is as follows:<!DOCTYPE html> <html> <head> <title>blog_floatdiv.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> <link rel="stylesheet" type="text/css" href="./css/blog_floatdiv.css"> <script type="text/javascript" src="./js/jquery-1.9.1.js"></script> <script type="text/javascript" src="./js/blog_floatdiv.js"></script> </head> <body> <div id="fdiv"> I am a floating div <img src="images/logingb.png"> </div> Floating divs floating div floating div floating div floating div floating div floating div floating div floating div Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs floating div floating div floating div floating div floating div floating div floating div floating div floating div Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs Floating divs </body> </html> 2.css part Copy code The code is as follows:#fdiv{ width:200px; height: 500px; background: yellow; position: fixed; top: 128px; _position: absolute; _top: expression(eval(document.documentElement.scrollTop)); } #fdiv img{ margin-left: 190px; margin-top: 470px; } 3.js part Copy code The code is as follows:$(function() { $("#fdiv img").click(function(){ $("#fdiv").hide(); }); }); |
<<: An article tells you how to write a Vue plugin
>>: CSS Back to Top Code Example
Table of contents Preface🌟 1. API Introduction 2....
I have been working on a project recently - Budou ...
Table of contents Preface Introduction-Official E...
In fact, this is very simple. We add an a tag to ...
0. What is a tag? XML/HTML CodeCopy content to cl...
Common application scenarios The interfaces of cu...
During the front-end development process, a situat...
nginx traffic control Rate-limiting is a very use...
The TextBox with the ReadOnly attribute will be di...
Table of contents 1. Introduction to the basic fu...
The MySQL version number is 5.7.28. Table A has 3...
Preface Since I needed to install Zookeeper durin...
This article shares the specific code of using ca...
Let's take a look at ufw (Uncomplicated Firew...
1. Write a Mysql link setting page first package ...