IE6 space bug fix method

IE6 space bug fix method
Look at the code:

Copy code
The code is as follows:

< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="//www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
<!--
p{font-size:12px;}
p:first-letter{font-size:300%}
-->
</style>
</head>
<body>
<p>To the world you may be one person, but to one person you may be the world. Even if you are sad, don't frown, because you never know who will fall in love with your smile. </p>
</body>
</html>

This code has no effect on the first letter style definition of <p> in IE6. However, after adding a space between p:first-letter and {font-size:300%}, that is, p:first-letter {font-size:300%}, the display becomes normal.

This problem mainly occurs in IE6 browser, and this friend also explained some necessary triggering conditions:
1. IE6 browser
2. The selector has a pseudo-class
3. The pseudo-class must contain a connector "-", for example: first-letter
4. Is there any space?

<<:  MySQL uses binlog logs to implement data recovery

>>:  CSS menu button animation

Recommend

jQuery canvas draws picture verification code example

This article example shares the specific code of ...

W3C Tutorial (10): W3C XQuery Activities

XQuery is a language for extracting data from XML...

What is JavaScript anti-shake and throttling

Table of contents 1. Function debounce 1. What is...

Detailed tutorial on running Tomcat in debug mode in IDEA Maven project

1. Add the following dependencies in pom.xml <...

3 Tips You Must Know When Learning JavaScript

Table of contents 1. The magical extension operat...

HTML dynamically loads css styles and js scripts example

1. Dynamically loading scripts As the demand for ...

Experience in solving tomcat memory overflow problem

Some time ago, I submitted a product version to t...

How to use jconsole to monitor remote Tomcat services

What is JConsole JConsole was introduced in Java ...

Hadoop 3.1.1 Fully Distributed Installation Guide under CentOS 6.8 (Recommended)

Foregoing: This document is based on the assumpti...

JavaScript realizes the effect of mobile modal box

This article example shares the specific code of ...

HTML page jump passing parameter problem

The effect is as follows: a page After clicking t...

Alpine Docker image font problem solving operations

1. Run fonts, open the font folder, and find the ...

Detailed explanation of CentOS configuration of Nginx official Yum source

I have been using the CentOS purchased by Alibaba...