Category:HTML5

  • JavaScript prototype prototype usage

    Time:2020-1-22

    JavaScript object prototype All JavaScript objects inherit properties and methods from the prototype. js JavaScript object function<span> Person(first, last, age, eye) { this<span>.firstName <span>=<span> first; this<span>.lastName <span>=<span> last; this<span>.age <span>=<span> age; this<span>.eyeColor <span>=<span> eye; } var<span> myFather <span>= new<span> Person(<span>”<span>John<span>”<span>, <span>”<span>Doe<span>”<span>, <span>50<span>, <span>”<span>blue<span>”<span>); var<span> myMother <span>= new<span> Person(<span>”<span>Sally<span>”<span>, <span>”<span>Rally<span>”<span>, <span>48<span>, <span>”<span>green<span>”<span>); document.getElementById(<span>”<span>demo<span>”<span>).innerHTML <span>= <span>”<span>My father […]

  • Using canvas to generate invitation posters with wechat avatars has no wechat avatar problem

    Time:2020-1-22

    Recently, I made a H5 page visited in wechat, long press the sharing picture to send the poster invited by friends, search the information on the Internet, come up with the solution, and use canvas to draw the page to generate pictures, Problem: Canvas images cross domain. Solution process (pit filling process): 1. From the […]

  • Mobile page event penetration / click penetration problem

    Time:2020-1-21

    Background One of the projects the blogger is in charge of is web page. There is an event penetration problem on the mobile end. After introducing the cause of the problem, it is found that it is a knowledge point of mobile web, which is worth recording. 2、 Click and 300ms delay Mobile browser provides […]

  • Implementation of iframe using PostMessage across domains

    Time:2020-1-21

    When we want to use a page service provided by domain name b.com under domain name a.com, the intuitive way to realize it is to use iframe. However, there are * * cross domain problems * * in iframe direct interaction. At present, there are two solutions. One is to use nginx proxy forwarding, configure […]

  • [qiyueliu Wuxu] first day in blog Park~

    Time:2020-1-19

    2019/07/28 [first of all]: the purpose of creating a blog is to share the basic knowledge of HTML5+CSS+JavaScript, and help the new beginners to master the basic knowledge. In addition to systematically sharing the relevant knowledge posts from the front to the back, from the easy to the difficult order, it will also appropriately attach […]

  • How HTML sets the width of span

    Time:2020-1-19

    This is a shareHTMLinspanLabel, how to set the width of the problem. Span Tags spanRepresents an inline element, equivalent toinlineAttribute only expands itself according to the width of the element and sets its own width, which does not work. Well, if I want tospanWhat if the element is set to width without setting the element? […]

  • Vue.js source code analysis (XXVIII) details of transition components of advanced applications

    Time:2020-1-18

    The transition component can add in / out transition to any element or component, but it can only implement transition effect for a single component (multiple elements can use the transition group component, which will be discussed in the next section). When calling the built-in component, the following features can be passed in: Name is […]

  • Cross domain modification iframe page content details

    Time:2020-1-18

    principle The primary site embeds the proxy page and transfers data to the proxy page. The proxy page operates the dom of the target page according to the data of the primary site. Because the proxy page and the target page share the same domain, the proxy page can obtain and operate the document object […]

  • Five different values of CSS position

    Time:2020-1-17

    Position property positionAttribute specifies the type of positioning method (static, relative, fixed, absolute, or sticky) to use for the element. There are five different values: static relative fixed absolute sticky Then usetop,bottom,leftandrightAttribute to locate the element. However, unless set firstpositionProperties, otherwise they will not work. They work differently depending on the location value. position:static; By […]

  • Using PostMessage to solve iframe cross domain communication problem

    Time:2020-1-17

    This week I came across a headache: to embed another third-party Web project in my web project. The first time I thought about using iframe, but the problem is that I have interaction with the third-party Web project, which violates the same origin policy. Dealing with cross domain issues is one of the most headache. […]

  • HTML tag summary

    Time:2020-1-16

    Paragraph Tags attribute Explain value align Its way Left (default), right, center             Level attribute Explain value width length  px % align Alignment mode Left, Center (default), right size thickness px color colour red、#f00                     Hyperlink a attribute Explain value href […]

  • Solve the problem that audio in HTML5 can’t play automatically on mobile phone and wechat

    Time:2020-1-16

    When doing the H5 page again, I found that audio can’t play automatically after autoplay is added to the mobile phone and wechat. This is because the mobile phone is set to save vagrancy The usual solution is to give an interactive event: Label: <audio loop src=”/photo/aa.mp3″ id=”audio” autoplay preload=”auto”> The browser does not support […]