• HTML5 preview local pictures


    Problem descriptionSuppose we have a picture upload control in HTML: Copy code The code is as follows: <input type=”file” name=”image” accept=”image/*” /> Note that this accept = “image / *” is very important. It specifies that the uploaded image will be related to the pop-up window selection type of the system at the mobile terminal. […]

  • Comprehensive analysis of standard attributes and custom attributes in HTML5


    As explained in the HTML5 syntax, an element can contain attributes and set various properties for an element. Some attributes are defined as global and can be used on any element, while others are defined as element specific. All properties have a name and a value, which looks like the following example. The following is […]

  • Sample code of how to share screenshots in front-end HTML5


    preface This article mainly introduces how to share screenshots using canvas,At first, I thought it was not difficult to share pictures through canvas painting, but in fact, I still encountered a lot of holes during developmentFor example:① The background of the picture is transparent② Share pictures only text, no pictures③ Picture cross domain problemHere is […]

  • Comparison of several popular HTML5 UI frameworks (summary)


    Most mobile HTML5 development uses existing frameworks. Here are a few popular UI frameworks. The author compares several popular HTML5 frameworks, personal opinions, for reference only. (1)MUI website:http://dev.dcloud.net.cn/mui/ Advantages: Mui is a popular framework launched by digital dcland. Personally, it is the best H5 UI framework at present. It is simple to use and easy […]

  • Implementation of HTML5 calling enterprise wechat


    preface H5 based page call through the API of enterprise wechat (transferred demo) 1、 Environment The enterprise wechat administrator adds an application, and the address points to the address of the H5 program. (enterprise wechat accesses the mobile phone project on the web published by you through the internal browser, which is not the focus […]

  • What new features have been added to HTML5


    introduce HTML5 is the next generation of HTML and will become a new standard for HTML, XHTML and HTML DOM. start HTML5 is the result of the cooperation between W3C and whatwg. Some rules established for HTML5: New features should be based on HTML, CSS, DOM, and JavaScript. Reduce the need for external plug-ins (such […]

  • Implementation of HTML5 mobile terminal prohibiting long press image saving


    When the mobile terminal accesses the H5 page, long pressing the picture will save the picture. In order to make the user experience better, we don’t save the picture when we need to long press. So how to achieve it? Three solutions are given below. Scheme 1: use pointer events: None img{ pointer-events:none; } The […]

  • Sample code for storing objects in HTML5 localstorage


    I want to store a JavaScript object in HTML5localStorage, but my object is obviously being converted to a string. I can use to store and retrieve raw JavaScript types and arrayslocalStorage, but the object doesn’t seem to work properly. Should I This is my code: var testObject = { ‘one’: 1, ‘two’: 2, ‘three’: 3 […]

  • Detailed explanation of REM adaptation scheme and viewport adaptation in HTML5


    H5 terminal REM adaptation scheme and viewport adaptation rem Rem is a new relative unit (root em, root EM) in CSS3Only according to the font size setting of the current HTML page. If the font size of the root directory is 18px, 1rem = 18px Media query settings @media screen and (min-width: 320px) { html […]

  • Implementation of playing video through data stream in HTML5


    This paper introduces how to play the video files of the server through data stream through H5 page, which can be compatible with PC, Android and IOS environments. The H5 page can play video through the < video > tab. The general method is as follows: <!DOCTYPE HTML> <html> <body> <video src=”/i/movie.mp4″ controls=”controls”> your browser […]

  • HTML5 sharedworker to achieve multi page communication example code


    Well, playing GitHub today, I first browsed some pages without logging in, and then logged in on a page. When you switch to other pages, you will see the following prompt: So how did this happen? One way we can think of is localstorage. When a page logs in, modify the localstorage status. When other […]

  • HTML5 example code for generating verification code


    The canvas tag of HTML5 is used to generate the canvas, and the verification code is drawn on the canvas with randomly generated numbers. The background is randomly generated colors and messy lines and dots. Advanced: use the form plug-in attribute binding verification code data (JSON) to obtain and check background data during sending or […]