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

How to implement input checkbox to expand the click range

XML/HTML CodeCopy content to clipboard < div s...

Instructions for recovering data after accidental deletion of MySQL database

In daily operation and maintenance work, backup o...

In-depth understanding of the use of Vue

Table of contents Understand the core concept of ...

How to use lazy loading in react to reduce the first screen loading time

Table of contents use Install How to use it in ro...

Some Linux file permission management methods you may not know

Why do we need permission management? 1. Computer...

Solution to the inconsistency between crontab execution time and system time

Preface In LINUX, periodic tasks are usually hand...

Example of how to use CSS3 to layout elements around a center point

This article introduces an example of how CSS3 ca...

Detailed steps to install MySQL 5.6 X64 version under Linux

environment: 1. CentOS6.5 X64 2.mysql-5.6.34-linu...

mysql workbench installation and configuration tutorial under centOS

This article shares the MySQL Workbench installat...

Docker mounts local directories and data volume container operations

1. Docker mounts the local directory Docker can s...

Detailed tutorial on compiling and installing python3.6 on linux

1. First go to the official website https://www.p...

Some questions about hyperlinks

<br />I am very happy to participate in this...