as shown in the following figure:
it feels like solving the problem of 1px line on retina screen. It can be that the border is all set to 2px. Ask for advice
as shown in the following figure:
it feels like solving the problem of 1px line on retina screen. It can be that the border is all set to 2px. Ask for advice
looked at the link you gave me and found this code
if(/Android (\d+\.\d+)/.test(navigator.userAgent)){
var version = parseFloat(RegExp.$1);
if(version>2.3){
var phoneScale = parseInt(window.screen.width)/640;
if(/MZ-M571C/.test(navigator.userAgent)){
document.write('<meta name="viewport" content="width=640, minimum-scale = 0.5, maximum-scale= 0.5">');
}else if(/M571C/.test(navigator.userAgent)&&/LizhiFM/.test(navigator.userAgent)){
document.write('<meta name="viewport" content="width=640, minimum-scale = 0.5, maximum-scale= 0.5">');
}else{
document.write('<meta name="viewport" content="width=640, minimum-scale = '+ phoneScale +', maximum-scale = '+ phoneScale +', target-densitydpi=device-dpi">');
}
}else{
document.write('<meta name="viewport" content="width=640, target-densitydpi=device-dpi">');
}
}else{
document.write('<meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi">');
}
target-densitydpi
its function is to zoom, the same as we set minimum-scale,maximum-scale. And this attribute is not supported in higher versions of android, ntot support , so the code in the script tag above is written, below android 2.3, using target-densitydpi to scale, and higher versions using minimum-scale,maximum-scale to scale. In essence, it is used to solve the problem of 1px.
I'm not sure about this question. I'm here to talk nonsense about my understanding and guess.
because this code sets the width of viewport to 640px, usually, the screen width of the mobile terminal is within the range of 360px-414px, it is obvious that the width of this viewport will be larger than device-width, so the browser will zoom first. If the dpi ratio of the phone is 2, then the 1px is not equal to 2 physical pixels, but less than 2 physical pixels.
then set minimum-scale ='+ phoneScale +', maximum-scale ='+ phoneScale +'to zoom further according to the screen dpi. After zooming twice in this way, it is very likely that the line of the 1px has been scaled to less than 1 physical pixel to render. So you need to set up another border-bottom:1px solid-sharpfff to compensate.
I only found divider this, not the one you mentioned, this is just a dividing line.
Thank you @ BBQ only sweet potatoes , very detailed. This is indeed a solution to the 1px problem. I found this article: TAT.tennylv Mobile web adaptation weapon-rem , which is mentioned in the rem adaptation Advanced level
.various methods have been tried, including the simplest way to disable the thouchmove event directly. Has the Wechat browser under ios been unable to stop the rebound? ...
In the vue-cli project, I directly introduced the particls library into index.html, and the related files are placed in the static directory . <div id="particles-js">< div> <script type="text javascript" src="s...
I am a novice. At present, I have encountered some confusion when learning set data types in Es6, as follows: in the Es6 about Ruan Yifeng, it is mentioned that set types can be used to intersect and judge sets, but I have tried it unsuccessfully. ...
the article on Wechat s official account crawled through python at the backend found that the video in the article could not be played, and the video was nested in iframe, as shown in <iframe class="video_iframe" data-vidtype="2"...
currently working on a saas platform what kind of architecture can meet the following requirements: Separation of front and rear ends flexible selection of front-end technology, less historical burden, convenient maintenance, and organizational n...
read what a big guy wrote: Function.prototype.bind = Function.prototype.bind || function (context) { var me = this; var args = Array.prototype.slice.call(arguments, 1); var F = function () {}; F.prototype = this.prototype; var bound...
the text matched by the search box above an article is highlighted to realize the idea. ...
want to use vue2.0 to develop a small web application for the company, running on the mobile side. How can the above functions be achieved? ...
A quick implementation is generally as follows: Function.prototype.bind = function (context) { var me = this; var argsArray = Array.prototype.slice.call(arguments); return function () { return me.apply(context, argsArray.slice(1)) ...
as shown in the picture, after clicking the button, you append a new button in document.body. How did the new button be updated to the page? will the original button be rendered again? ...
I just got in touch with Mini Program developer and recently encountered this problem when I wrote the demo, of a music player. After I returned to the list page from the playback page (or to the home page), I entered the playback page from the entrance...
const obj = { name: " jsCoder", skill: ["es6", "react", "angular"], say: function () { for (var i = 0, len = this.skill.length; i < len; iPP) { setTimeout(function(){ ...
as shown in the figure above, use css to make a magnification effect when a mouse passes over a square, but as soon as you enlarge a square, the square next to it will be squeezed out or squeezed into the next row. Is there any way to fix the enlarge...
there is a bypass Filter in proxyTable. How do I use it? Is it the return path? Or return true false ...
there is such a requirement, as shown in the figure are four menu buttons. The four menu icons here are not vector icons similar to Font Awesome, but pictures in png format, namely f.png, u.png, s.png, and p.png. demand: clicking on the correspondi...
1. At the beginning, it was 2. . Why is this? ...
how do Vue projects built with Nuxt.js share header and footer files? only files with section contents are placed in the page directory. Navigation bars and footers and every time you jump to a new route, navigation doesn t have to be reloaded. Gods, ...
I have a vegetable chicken at the front end. Recently, there is a new demand for the company s project, which has been maintained by others before. the front end uses a framework built by pHp and uses the memcached plug-in. After the project runs, ,...
In the case of MDN, the local operation does not print the geographical location, nor does it report an error. Why? Ask for instructions at the beginning, the PC side has been returning a timeout. It may be because the PC side does not support it. Afte...
there is a benchmarks directory in some open source projects, such as vue , which is very popular now. The literal translation of benchmark means benchmark test. It seems that some functional performance tests can be done. given that there is a test di...