Preface: Use debugbar to view document code in ietester. There is this text: empty text node in every ul li, some are in span, in... In a word, there must be one under the li, sometimes there are more than one. Generally, there is no problem. Today, I encountered an unlucky thing. I saw that the text: empty text node had a height when using layout, and it was not the height of the li, but 4px higher than the displayed height of the li. For the previous paragraph, this 1px is painful, let alone 4px. This guy had me puzzled for a long time. Think about the translation: Text: Empty text node. If it is empty, why does it have a height? I searched online but found no corresponding explanation. I posted the CSS code, let's study it together. I added font-size:0px in the li; although it solved the problem, I still want to ask the experts to give some reasons! Copy code The code is as follows:.sidebar_menu{width:225px; list-style:none; position:relative;} .sidebar_menu li{ line-height:34px;width:225px; height:35px;<SPAN style="COLOR: #ff0000">font-size:0px;</SPAN> position:relative;} .sidebar_menu li span{ display:block;width:225px;height:34px; overflow:hidden; border-bottom:1px solid #007ac7;} .sidebar_menu li span a{ width:225px;text-align:left;text-indent:35px;display:block; font:14px/34px Arail,"Microsoft YaHei";color:#333; background:#c3e1f4;} Upload a screenshot This picture can be seen very well in ietester. Click layout to see the text: empty text node. ![]() |
<<: canvas.toDataURL image/png error handling method recommendation
>>: Detailed introduction to linux host name configuration
Nested use of MySQL ifnull I searched online to s...
CUDA installation download cuda Enter the nvidia-...
Previously, react.forwardRef could not be applied...
Common utf8mb4 sorting rules in MySQL are: utf8mb...
describe This article introduces a method to impl...
CSS3 achieves cool 3D rotation perspective 3D ani...
Recorded the download and installation tutorial o...
Ubuntu install jdk: [link] Install Eclipse on Ubu...
Table of contents 1. Installation and operation o...
Using Navicat directly to connect via IP will rep...
Table of contents 1. List interface display examp...
Introduction The default source of Ubuntu is not ...
This article records the detailed process of down...
MySQL 5.7.13 installation tutorial for Mac, very ...
This article shares the installation and configur...