DWQA QuestionsCategory: Development ToolWhy is the edge of the icon always cut off when using SVG as an icon
Time permits asked 1 month ago

Why is the edge of the icon always cut off when using SVG as an icon
Why is the edge of the icon always cut off when using SVG as an icon
The original size of the icon is 64 * 64px. The first picture is a screenshot of the icon displayed on the retina screen, and the second is a design drawing.
The size of the icon is as follows

svg.icon{
    font-size: 2.142857142857143rem;
    width:1em;
    height:1em;
}

html{
    font-size: 15.296875px;
}

When the web page is running, a font size value will be calculated from the screen height first, and then set to HTML. Each element in the page takes rem as the unit, which is used to realize the equal scale enlargement and reduction.
However, many icons on the left or the bottom of different screens will be cut off in varying degrees.
Firefox, Safari and ie11 are all right, so there’s something wrong with chrome.
why?

Humphry replied 1 month ago

sub-pixel bug

1 Answers
illusate answered 1 month ago

Is the position and size of the AI board an integer?