Article From:https://segmentfault.com/q/1010000011708739
Question:

Hello, guys. Recently, when I was trying to use Ali’s flexible layout, I encountered a lot of problems. I knelt down and asked my predecessors for guidance. !

All online sources say that fonts can’t be rem, they need px, so I use PX all the fonts, but fixed fonts will appear small if they don’t zoom in on the big screen, so I added this at the end of the CSS

But when I debug it in Google Browser, mobile mode, neither of these two pieces of code will work.



And when I manually modify the CSS code or HTML code, refresh the page, and there’s one, every time
This hairlines class will disrupt the layout.

I have been puzzled for a long time.
This is my exercise.

Answer 0:

[data-dpr=”2″] Is a selector, take Ali’s demo look, HTML should have this property, do not know why you do not here, so your style is not effective

// This is the case in Ali demo.< HTML lang= "en" data-dpr= "1" style= "font-size: 54px;" >

I looked at https://github.com/amfe/lib-f… the code for this repository, ah, really no data-dpr
But the repository where the flexible document resides is https://github.com/amfe/lib-f… with data-dpr settings. So do you see if the first warehouse plan is used?

Why is the two part of the code inconsistent? I’m not sure.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *