I am developing a hybrid mobile application using phonegap. I want to display text which should look similar in size on all android/ios devices. it should work in all resolutions.
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width target-densitydpi=device-dpi" />
Conditions are like,
i just want to avoid media queries like
@media only screen and and (-webkit-max-device-pixel-ratio : 1){
.todo-actions{
font-size: 70%;
}
}
@media only screen and (-webkit-min-device-pixel-ratio : 1.5) and (-webkit-max-device-pixel-ratio : 1.9){
.todo-actions{
font-size: 120%;
}
}
I found solution here:
https://stackoverflow.com/a/26537865
Remove target-densitydpi=device-dpi from meta tag.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.