Home > Web Front-end > HTML Tutorial > Encountered a strange problem_html/css_WEB-ITnose

Encountered a strange problem_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:58:39
Original
998 people have browsed it



As shown in the picture above, what is the problem with the upper part of the text in the table always being incompletely displayed?


Reply to the discussion (solution)

No code, no truth

There may be a font problem, it may be set to English, such as font-family:serif;
Set it to Song Dynasty or Microsoft Yahei and take a look. font-family:'Songti';

There may be a font problem, it may be set to English, such as font-family:serif;
Set it to Songti or Microsoft Yahei and have a look. font-family:'Arial';



The problem is still not solved after setting font-family:Arial; in the body part to font-family:'Arial';

The monitor is broken .


There may be a font problem, it may be set to English, such as font-family:serif;
Set it to Song Dynasty or Microsoft Yahei and take a look. font-family:'Arial';



The problem is still not solved after setting font-family:Arial; in the body part to font-family:'Arial';
I guess There is something wrong with your settings. This is inside the table and requires special settings for the table.
.table th,.table td{font-family:'宋体';}
Copy after login
Copy after login
Copy after login



There may be a font problem, it may be set to English, such as font-family:serif;
settings Check it out in Song Dynasty or Microsoft Yahei. font-family:'Arial';



The problem is still not solved after setting font-family:Arial; in the body part to font-family:'Arial';


I guess There is something wrong with your settings. This is inside the table and requires special settings for the table.
.table th,.table td{font-family:'宋体';}
Copy after login
Copy after login
Copy after login



The strange thing is that if you first define a style1{ font-size: 12px;
font-family: "宋体";
font-style: normal;
line-height: normal;}

Then add a class="style1" to each td, and it will return to normal. However, there are many tds, and it is troublesome to add them one by one, so I want to find Is there a one-time solution?



It may be a font problem. It may be set to English, such as font-family:serif;
Set it to Song Dynasty or Microsoft Yahei and take a look. font-family:'Arial';



The problem is still not solved after setting font-family:Arial; in the body part to font-family:'Arial';


I guess There is something wrong with your settings. This is inside the table and requires special settings for the table.
.table th,.table td{font-family:'宋体';}
Copy after login
Copy after login
Copy after login



Hey, this is the final solution:

First define a style1{ font-size: 12px;
font-family: "宋体" ;
font-style: normal;
line-height: normal;}

Then add a class="style1" to the div where the table is located

Although this can be solved, But I am very confused, why do I have to add class to the div to solve it, but writing .table td directly in css cannot solve it

td div {  font-size: 12px;  font-family: "宋体";  font-style: normal;  line-height: normal;}
Copy after login
Copy after login

td div {  font-size: 12px;  font-family: "宋体";  font-style: normal;  line-height: normal;}
Copy after login
Copy after login


The main problem is that line-height: normal must be added. This is the key to this problem
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