Home  >  Article  >  Web Front-end  >  How to solve the jumping problem of font-weight:blod with CSS

How to solve the jumping problem of font-weight:blod with CSS

php中世界最好的语言
php中世界最好的语言Original
2018-01-30 09:47:502566browse

This time I will bring you font-weight: How to solve the jumping problem of blod with CSS, font-weight: How to solve the jumping problem of blod with CSSWhat are the precautions , the following is a practical case, let’s take a look.

Requirement: Implement the function of making the link font bold when the mouse hovers over the link.

Implementation method 1:

a:hover{font-weight:blod}


As a result, the page will jump when the mouse is hovering. Because changing the font changes the size of the element, it causes the page to rearrange, so there will be jumping.

Implementation method 2:

a:hover{text-shadow: 1px 0 0 currentColor;}

I believe you have mastered the method after reading these cases. For more exciting information, please pay attention to the php Chinese website Other related articles!

Related reading:

How to achieve mobile page scaling in h5

How to use H5’s WebGL at the same time An interface to make json and echarts charts

#html5 What are the methods to clear the canvas

The above is the detailed content of How to solve the jumping problem of font-weight:blod with CSS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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