Comments (4)
1px 边框建议:
.J_HAD_COUPON {
color: #A5A5A5;
&::after {
position: absolute;
content: "";
top: 0;
left: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
height: 100%;
border-style: solid;
border-width: 1px;
border-color: #CCCCCC;
pointer-events:none;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
border-radius: 40px;
-webkit-border-radius: 40px;
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx) {
&::after{
width: 200%;
height: 200%;
-webkit-transform: scale(.5);
transform: scale(.5);
}
}
@media (-webkit-device-pixel-ratio: 1.5) {
&::after {
width: 150%;
height: 150%;
-webkit-transform: scale(.6666);
transform: scale(.6666);
}
}
@media (-webkit-device-pixel-ratio: 3) {
&::after {
width: 300%;
height: 300%;
-webkit-transform: scale(.3333);
transform: scale(.3333);
}
}
}
可以封装成相关的 sass、less 方法
from article.
我也遇到的相同的问题
from article.
1px不要用rem作为单位,直接写"1px"
from article.
安卓机型许多都不识别带小数的px,rem是否也有这个问题?
from article.
Related Issues (20)
- stylus 字体 Vue项目px转rem HOT 3
- flexible源码有些不明白,求大神支招,thanks HOT 1
- flexible 布局有疑问 HOT 1
- 不错 HOT 1
- font-size in PC and mobile
- webpack2 postcss 使用px2rem 怎么解决
- 1024*768的设计稿子怎么设置fontsize 与 rem 的转换呢 HOT 1
- 在pc里面F12测试各个手机版本都没问题,在放在实际手机里面就出问题了。
- 移动端页面适配 HOT 1
- 淘宝
- flexible 为什么在html上的字体大小最大只能为 54px
- H5中为啥px能实现等高(容器高度写死px,px无任何后处理)
- b / i > 540 && (b = 540 * i); 这段代码什么意思
- 一
- 页面选择的是750px,但是html 的font-size值却是54px,这是为什么呢??
- 为什么安卓机的dpr始终为1 HOT 2
- ssss HOT 2
- 我也想问为什么安卓手机dpr是1,如何改善以前用flexible适配的移动端项目在安卓机上面的适配呢
- new issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from article.