Home > Web Front-end > HTML Tutorial > Why is display:none; invalid in IE6? _html/css_WEB-ITnose

Why is display:none; invalid in IE6? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:10:16
Original
1301 people have browsed it

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style type="text/css">.ceshi a{	width:200px;	height:200px;	position:relative;	background-color:#0F0;	display:block;	}.ceshi a .b{	width:100px;	height:100px;	position:absolute;	right:0px;	bottom:0px;	background-color:#000;	}.ceshi a:hover{	border:0 none; /*这个地方是在网上看的方法,IE6下无法起到作用*/	}.ceshi a:hover .b{	display:none;	}</style></head><body><div class="ceshi"><a href="#" target="_blank"><div class="b"></div></a></div></body></html>
Copy after login


This div must be displayed in the lower left corner when the page is opened.
It will only disappear when the mouse is moved in.
Please give me some advice, thank you... ....


Reply to discussion (solution)

.ceshi a:hover .b{    display:none;    background:none;}
Copy after login

.ceshi a:hover{
border :0px #69f none; /*Write completely*/
}

I forgot the order, maybe it’s not right

CSS code

.ceshi a:hover . b{
display:none;
background:none;
}

- -~! My div may contain other things, there is no point in doing this.
Moreover, it is invalid under IE6

.ceshi a:hover{
border:0px #69f none; /* Write in full*/
}

I forgot the order, it may not be right

It still doesn’t work under IE6

Add display:block;
Then you don’t have to The abbreviated form, write it down and take a look, it is border-style, border-width: write one by one

Also, I didn’t see when the border was added

I haven’t touched it in IE6 for a long time

Let’s hide it in another way
For example, set the width/height to 0

Let’s hide it in another way
For example, set the width/height to 0

That’s okay, it seems my thinking is too narrow,
Thank you, it’s done

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template