Home  >  Article  >  Web Front-end  >  How to eliminate aliasing in css

How to eliminate aliasing in css

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-06-01 17:08:103432browse

Methods to eliminate aliasing: 1. Use the -webkit-font-smoothing attribute, the syntax "-webkit-font-smoothing:antialiased"; 2. Use the transform attribute, the syntax "transform:translateZ(0)".

How to eliminate aliasing in css

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

There are many CSS methods for eliminating aliasing on the Internet (all based on CSS3, not applicable below IE8). I have made statistics and they are roughly as follows.

Use -webkit-font-smoothing to smooth the text (to be honest, there is not much difference...)

Syntax:

-webkit-font-smoothing: antialiased;

CSS3 transform rotate (rotation) Solution to jaggedness:

We simply add translateZ(0) to the CSS3 transform attribute. Example:

-webkit-transform: rotate(5deg) translateZ(0);

Recommended learning: css video tutorial

The above is the detailed content of How to eliminate aliasing in 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