Personal front-end log

How to use @ media screen to realize adaptive layout of web pages

Lu Xiaowei
seven thousand one hundred and eighty-seven
October 17, 2019

You often have trouble with the layout dislocation of devices with different resolutions or different window sizes. You can use @ media screen to realize the adaptive layout of web pages

Advantages: no plug-in and mobile phone theme, friendly to mobile devices, and can adapt to various window sizes

Just use the CSS Add the @ media screen attribute in the, judge and output different length and width values according to the browser width

The following is a css written for your own theme. Only the main article frame is reserved for devices below 768 in width, so as to obtain the best reading experience in limited space

Tips for Canvas to draw picture levels

Lu Xiaowei
eight thousand four hundred and ten
January 10, 2018
Recently, we are planning an H5 for the Year of the Dog. Due to the rules of WeChat, induction sharing is prohibited, but we want better communication effects. What should we do? Finally, we chose the curve to save the nation, and let the final page be converted into a two-dimensional code with H5 in the image. It sounds like a familiar routine. Many friends have already used it, and the implementation methods of different companies are also different. It is implemented in PHP, but also in Canvas to image. Here we use the second one. The second method transfers all the pressure to the front end. We will use img. onload=function() {} to draw pictures in Canvas; Method, but there will be a hierarchy problem when drawing multiple pictures. If the first picture is too large, the next picture will be covered

Javascript random number in a range

Lu Xiaowei
three thousand five hundred and ten
January 8, 2018
Many times, we need random numbers in a range, such as numbers in the range of 0~100. How to write the following code: function RandomNumBoth (Min, Max) {//Min Min Min Min Min Max Max Max     var Range = Max - Min;     var&

How does webpack3 correctly reference and use the jQuery library

Lu Xiaowei
four thousand four hundred and fifty-five
August 24, 2017

After Baidu, Google, SF, and Stackoverflow, we finally solved the problem of webpack3 citing jQuery. There are too many repeated articles on the Internet, and most of them are outdated. Webpack has also developed very fast in the past two years, most of them are 1.0 version articles, and few of them have kept pace with the times. After a glance, it has now developed to 3.5.5, Few articles can solve the problem. The following is the implementation code of webpack3

"Front end record" - webkit filter: blur will cause the mobile terminal to jam

Lu Xiaowei
six thousand six hundred and fourteen
December 16, 2016
-The webkit filter: blur attribute is very useful for the PC side, and the Gaussian blur effect is particularly good. However, when this effect is used on the mobile side, it is more than enough. Due to hardware limitations, the hardware rendering speed of the mobile side will consume resources, so it will cause a jam. If you want to achieve this effect, it is recommended that the mobile side use two pictures, One is the effect of Gaussian blur, and the other is a clear picture. Exchange the display, so that you can simulate the effect of gradually clear Gaussian blur. You should also learn to draw inferences from one instance on the front road, and all roads lead to my home!

Easily resolve the problem that iOS system and WeChat do not support audio auto play

Lu Xiaowei
sixteen thousand three hundred and fifty-seven
December 16, 2016

 Easily resolve the problem that iOS system and WeChat do not support audio auto play

Recently, we are working on the mobile terminal project of the annual Daliao Grand Ceremony. We need to equip a background music for H5 and play it automatically. We can add the automatic playing code according to the previous method, but a small episode (face covering) occurred

WeChat applet pit drainage guide

Lu Xiaowei
thirteen thousand seven hundred and seventy-two
November 24, 2016

 weixinfangkeng.jpg

The background image does not display the background image. In the WeChat applet, users are allowed to customize the background image, but the path and address of the background image are limited. Previously, the relative path has been used to write the background image. The WeChat developer tool also displays the background image, mistakenly believing that there is no problem. However, during the preview, the background image is not displayed in the mobile phone. This is the first pit introduced today, The background image is not allowed to be a local image. The solution is

An epoch-making article

Lu Xiaowei
five thousand seven hundred and eighty-eight
November 16, 2016
He is said to have epoch-making significance because he carries the role of article testing of the whole website. Without him, there would be no page layout of other articles, no exquisite style of other articles, and without him, there would be nothing! The first part is actually to clarify the paragraph

 wx.png

Although I have studied Apple a lot, people always compare small programs and apps together, so I also took time to look at the development guide of small programs, especially the design and principles of the UI part. Today I compare it with Apple's HIG (Human Interface Guidelines). In fact, the two are consistent in dealing with some major principles.

How to enable browsers below IE10 to support the "bind" attribute or method

Lu Xiaowei
four thousand one hundred and twenty-seven
November 9, 2016

 jsbind.png

Recently, the cxselect multi-level linkage plug-in was used in the shopping channel, and this plug-in uses the "bind" method. For browsers below IE10, if the bind function is used in the JS code, the message "SCRIPT438: The object does not support the" bind "attribute or method, because the browser does not provide a method for this parameter, To solve this problem, we need to write a "bind" method to make this parameter effective.

Powered By Z-BlogPHP 1.6.7 Valyria

Copyright webexp.cn Rights Reserved.

This site is based on AliCloud server + Name + Z-Blog Build| Site Map    |