• Table in HTML sets different colors and widths for each cell


    It is recommended that you do not directly set the width and height in the table, which often fails to take effect, If you add settings in style, there will be no problem. The code can be directly copied to the body. Copy code The code is as follows: <table cellspacing=”0″ style=”color:#FFF; text-align:left; font-size:14px; font-weight:bold; […]

  • Egret adaptation mode


    In the project, the device pixel in the iPhone 6 / 7 / 8 plus is 414 * 736 through the devtool simulator, the width and height of canvas is 1242 * 2208, and the width and height of content configured according to the design draft is 750 * 1204. How are so many data […]

  • The application of REM and postcss pxtorem in Vue


    REM layout Rem is the root element(htmlInfont-sizeValue.There are not many details about REM layout. There are many materials that explain the principle of REM layout in detail.Simply put, the device width is dynamically set to REM value through JS to achieve the effect of using rem as the unit of element adaptation in different width […]

  • Vue + apicloud + clipper.js completes uploading + clipping + compressing pictures


    Go straight to the code, many of them have comments Idea: use apiclound to pull up the camera and album first, then get the picture, according to the width(targetWidthThis parameter) is used to compress and use clipper.js to cut the compressed image.Finally, get the server that the cut image is uploaded, get the address returned […]

  • Get the width and height of the screen


    In JS, especially in some functions, such as which buttons to return at the bottom, etc., it is often needed. Here is a comprehensive application of the following, so that you can get them quickly in the future: /** *Get the width and height of the screen * @returns {*} */ function client() { If […]

  • Hand teaching H5 games – greedy snake


    Simple small game production, the amount of code is only two or three hundred lines. The game can be extended by itself. Source code has been released to GitHub, like a little star, source entry: game Snake The game has been released, and the game portal: http://snake.game.yanjd.top Step 1 – create ideas How to realize […]

  • 2. Another way to realize Baidu Beijing time clock


    Next, this paper uses the method of calculating angle directly with sine and cosine to draw. Effect preview: https://codepen.io/andy-js/pen/bgnygplRight click to open a new window preview better! Direct code: <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <meta http-equiv=”X-UA-Compatible” content=”ie=edge”> < title > Andy JS: another way to realize Baidu Beijing time […]

  • Mobile adaptation summary


    Personal summary, combined with the articles of the gods, if there is something wrong, please point out~ Preconception Device pixels The physical pixel of the device screen, indicating how many dots can be laid on the screen, rather than an absolute length unit (such as in, mm); the unit is Px, such as iPhone 6 […]

  • Settlement method of collapse after floating


    If Li floating causes ul to have no width, set a width manually for UL or an overflow: hidden for div;

  • To explore the realization of CSS with single line text centered and multi line text left


    Original linkhttps://github.com/XboxYan/notes/issues/13 Long ago Just at the front end meeting, the product manager put forward such a demand Can we judge this paragraph of text? When the text is less than one line, let it be centered. When the text is more than one line, let it be left. Otherwise, the centered display is very […]

  • Use electronic to realize the function of suspending windows on Baidu network disk!


    Dependent dependence It uses vuex Vue Vue route storejs Storejs is used to persist the status of vuex Exhibition Introduction Not using the built-in-webkit-app-region: dragBecause there are many problems with using himFor example, events cannot be used, right click cannot be used, and hand type cannot be used! install There is no screenshot during installation, […]

  • CSS3 flex layout justify content: space between last line left aligned


    in usejustify-content:space-betweenWhen layout, use thejustify-self: start;No effect. Check that the CSS3 flexbox is not supported. So how to achieve the left alignment of the last line? Several existing schemes Use tag elements to fill in missing items Using grid Using pseudo class In the case of pseudo class, if the last element is full, there […]