Home Web Front-end HTML Tutorial Does ie6 support hover?

Does ie6 support hover?

Nov 22, 2017 am 10:34 AM
hover ie support

Under normal circumstances, it is supported. What if your browser does not support hover? Then we will give you a solution to the problem that the browser does not support hover.

First we need to download csshover.htc

After downloading the compressed package file and decompressing it, we will get the file "csshover.htc". In order to avoid errors in the "csshover.htc" path when introducing css styles, we will Place this file in the same folder as the css file. The experiment here does not create a separate css file, there is only one "index.html" file, so put "csshover.htc" and "index.html" in the same folder.

In the same folder

Put it in the same folder

Introduce the file in the body style selector

Defined in the body style selector" body {behavior:url("csshover.htc"); }", which can be placed at the front of the style code.

body selector definition

Introduce the definition in the body selector into csshover.htc

This is done. The css style definition of this webpage is such as div:hover, li:hover, p :hover, custom named css selection name (.abc:hover), img:hover, and defined styles are all supported by IE6.

Special attention:

To succeed, you need to add the following code directly to the HTML (directly introduce the csshover.htc file into the HTML file):

<style> 
body{behavior:url("csshover.htc");} /* 使用时候注意路径正确 */
</style>
Copy after login


Pay attention to the csshover.htc path.

ie6 supports hover case

We conduct three experimental examples respectively.

Description of experimental examples

The first example: assign hover (i.e. img:hover{...}) style to the img tag, and the picture will be larger when the mouse passes over it , the distance between the border and padding appears;

The second example: assign the hover (i.e. li:hover{...}) style to the li label, and the ul li label appears black when the mouse passes over it Border;

The third example: Name the css style you want and give it hover (i.e. .abc:hover{...}). When the mouse passes over the abc object DIV box, the text in the object changes to red.

The CSS code of these three small experimental examples is as follows:

body { behavior:url("csshover.htc"); }/* css注释:别忘记csshover.htc,使用时候注意路径 */ 
img{width:165px; height:60px; background:#090;}/* 原本图片宽度和高度背景颜色 */ 
img:hover{width:200px; height:200px; padding:3px; border:2px solid #00F; cursor:pointer} 
/* hover鼠标经过赋予让图片变宽 高,设置padding和2px蓝色边框、css cursor为鼠标指针样式  */ 
li:hover{ border:1px solid #000}/* li列表标签鼠标经过出现黑色边框 */ 
.abc:hover{ color:#F00}/* 对象.abc鼠标经过其内容css字体颜色变红色 */
Copy after login

The corresponding HTML source code of the three experiments:

<!-- html注释:1 鼠标经过图片变大 --> 
<img src="div -logo-2013.gif" alt="DIV LOGO" /> 
<!-- 2 鼠标经过li出现边框  --> 
<ul> 
<li>对li设置hover样式,鼠标经过加CSS边框</li> 
</ul> 
<!-- 3 鼠标经过abc盒子内文字变为红色  --> 
<div class="abc">对.abc:hover,鼠标经过时候文字颜色变红</div>
Copy after login

There are so many solutions for browsers that do not support hover. Friends who need it can save it, and please continue to pay attention to other updates of this site.

Related reading:

Sharing of graphic and text code for making html navigation bar


How to use CSS operation div's z-index


How to write the anchor text of html

The above is the detailed content of Does ie6 support hover?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CSS tip: Use transition to retain hover state CSS tip: Use transition to retain hover state Sep 27, 2022 pm 02:01 PM

How to preserve hover state? The following article will introduce to you how to retain the hover state without using JavaScript. I hope it will be helpful to you!

How to fix Windows Hello unsupported camera issue How to fix Windows Hello unsupported camera issue Jan 05, 2024 pm 05:38 PM

When using Windows Shello, a supported camera cannot be found. The common reasons are that the camera used does not support face recognition and the camera driver is not installed correctly. So let's take a look at how to set it up. Windowshello cannot find a supported camera tutorial: Reason 1: The camera driver is not installed correctly 1. Generally speaking, the Win10 system can automatically install drivers for most cameras, as follows, there will be a notification after plugging in the camera; 2. At this time, we open the device Check the manager to see if the camera driver is installed. If not, you need to do it manually. WIN+X, then select Device Manager; 3. In the Device Manager window, expand the camera option, and the camera driver model will be displayed.

Pros and Cons Analysis: A closer look at the pros and cons of open source software Pros and Cons Analysis: A closer look at the pros and cons of open source software Feb 23, 2024 pm 11:00 PM

Pros and cons of open source software: Understanding the pros and cons of open source projects requires specific code examples In today’s digital age, open source software is getting more and more attention and respect. As a software development model based on the spirit of cooperation and sharing, open source software is widely used in different fields. However, despite the many advantages of open source software, there are also some challenges and limitations. This article will delve into the pros and cons of open source software and demonstrate the pros and cons of open source projects through specific code examples. 1. Advantages of open source software 1.1 Openness and transparency Open source software

Experience is flying. Take a flight with Haval X1 camera Experience is flying. Take a flight with Haval X1 camera Jan 15, 2024 pm 02:21 PM

We can often see a lot of wonderful top-down videos on the Internet. The pictures taken by drones are indeed quite shocking. However, in fact, many people have limited understanding of drones. For example, why can they still fly in some places where flying is restricted? In fact, ready-to-fly “drones” are the current mainstream, and they are more worthy of most people’s choice. Today I will give you a hands-on experience with the Harvest Flying Camera X1. In terms of appearance, the Harvest Flying Camera X1 has the first folding design. The whole camera is only 125g, which is lighter than a mobile phone. After folding, it can be easily held in the hand and put into a bag without any pressure. Four soft dyed leaves and safety frame design perfectly protect the safety of shooting. Dyed Leaf innovatively uses Biobased biological substrate, which is highly elastic, durable, safe and environmentally friendly; it also has a fully protective frame to protect your hands during takeoff and landing.

Does PyCharm Community Edition support enough plugins? Does PyCharm Community Edition support enough plugins? Feb 20, 2024 pm 04:42 PM

Does PyCharm Community Edition support enough plugins? Need specific code examples As the Python language becomes more and more widely used in the field of software development, PyCharm, as a professional Python integrated development environment (IDE), is favored by developers. PyCharm is divided into two versions: professional version and community version. The community version is provided for free, but its plug-in support is limited compared to the professional version. So the question is, does PyCharm Community Edition support enough plug-ins? This article will use specific code examples to

Internet Explorer opens Edge: How to stop MS Edge redirection Internet Explorer opens Edge: How to stop MS Edge redirection Apr 14, 2023 pm 06:13 PM

It's no secret that Internet Explorer has fallen out of favor for a long time, but with the arrival of Windows 11, reality sets in. Rather than sometimes replacing IE in the future, Edge is now the default browser in Microsoft's latest operating system. For now, you can still enable Internet Explorer in Windows 11. However, IE11 (the latest version) already has an official retirement date, which is June 15, 2022, and the clock is ticking. With this in mind, you may have noticed that Internet Explorer sometimes opens Edge, and you may not like it. So why is this happening? exist

ASUS TUF Z790 Plus is compatible with ASUS MCP79 memory frequency ASUS TUF Z790 Plus is compatible with ASUS MCP79 memory frequency Jan 03, 2024 pm 04:18 PM

ASUS tufz790plus supports memory frequency. ASUS TUFZ790-PLUS motherboard is a high-performance motherboard that supports dual-channel DDR4 memory and supports up to 64GB of memory. Its memory frequency is very powerful, up to 4800MHz. Specific supported memory frequencies include 2133MHz, 2400MHz, 2666MHz, 2800MHz, 3000MHz, 3200MHz, 3600MHz, 3733MHz, 3866MHz, 4000MHz, 4133MHz, 4266MHz, 4400MHz, 4533MHz, 4600MHz, 4733MHz and 4800MHz. Whether it is daily use or high performance needs

What should I do if win11 cannot use ie11 browser? (win11 cannot use IE browser) What should I do if win11 cannot use ie11 browser? (win11 cannot use IE browser) Feb 10, 2024 am 10:30 AM

More and more users are starting to upgrade the win11 system. Since each user has different usage habits, many users are still using the ie11 browser. So what should I do if the win11 system cannot use the ie browser? Does windows11 still support ie11? Let’s take a look at the solution. Solution to the problem that win11 cannot use the ie11 browser 1. First, right-click the start menu and select "Command Prompt (Administrator)" to open it. 2. After opening, directly enter "Netshwinsockreset" and press Enter to confirm. 3. After confirmation, enter "netshadvfirewallreset&rdqu

See all articles