Home > Web Front-end > HTML Tutorial > A new bug, regarding drop caps. Looking for a solution_html/css_WEB-ITnose

A new bug, regarding drop caps. Looking for a solution_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:58:02
Original
1260 people have browsed it

About ie6's style support for the first-letter pseudo-class

The html code is as follows:

 <p class="tit_f">                    HHONORY CERTIFICATE<br />                    <span>荣誉证书</span>                </p>
Copy after login

This is the style:
.tit_f:first-letter {font-size:30px;float:left;padding-top:10px;}
Copy after login


Effect
Firefox:

chrome:

ie6:


The current problem is that no matter how you set padding and margin under IE6, you cannot make the first letter orient. What should I do if I move down?


Reply to discussion (solution)

By the way, is everyone off on Sunday?

Since Firefox and chrome behave differently, then it doesn’t make sense

Since Firefox and chrome behave differently, then it doesn’t make sense


Firefox and Chrome can be corrected with hacks, but there is absolutely no way for IE. Doesn’t it mean that IE supports the first-letter pseudo-class?

The general idea is like this. If there is a difference, adjust the value:

<!doctype html><html><head>    <meta charset="UTF-8">    <title></title>    <style type="text/css">        *{ margin:0; padding:0;}        .tit_f{}        .tit_f i{ position:relative;top:0;font-size:42px;float:left;font-style:normal;}        .tit_f span{font-size:14px;}    </style></head><body><p class="tit_f">    <i>H</i>HONORY CERTIFICATE<br />    <span>荣誉证书</span></p></body></html>
Copy after login
Copy after login

The general idea is like this. If there is a difference, adjust the value:

<!doctype html><html><head>    <meta charset="UTF-8">    <title></title>    <style type="text/css">        *{ margin:0; padding:0;}        .tit_f{}        .tit_f i{ position:relative;top:0;font-size:42px;float:left;font-style:normal;}        .tit_f span{font-size:14px;}    </style></head><body><p class="tit_f">    <i>H</i>HONORY CERTIFICATE<br />    <span>荣誉证书</span></p></body></html>
Copy after login
Copy after login


Thank you!
Related labels:
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