亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

How can the width of a font style be independently fixed?
P粉502608799
P粉502608799 2023-08-13 19:50:49
0
1
613
<p>There is a horizontal menu: </p> <pre class="brush:php;toolbar:false;"><ul> <li>Text</li> <li>Text 2</li> </ul></pre> <p>When the user clicks on one of the li's, its font becomes bold. Therefore, the width of the li element will change slightly. As a result, the menu jumps. </p> <p>How can I fix it so that it is not affected by the text width? </p>
P粉502608799
P粉502608799

reply all(1)
P粉225961749

You can use CSS to prevent the li width from changing, as shown below:

ul li {
   width: 150px;
}

This will prevent jumping

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template