Tag:Custom Properties

  • 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 […]

  • Introduction to the use of data custom attribute and plug-in application in HTML


    You may often see that some HTML has data attributes. These are HTML5 custom attributes. You can do a lot of things. It’s very convenient to call JS directly. Although they are HTML5 attributes, the good thing is that jQuery is universal, so they can be used normally in all browsers, including low version ie. […]

  • Summarize what are the HTML5 custom attributes


    definition H5 provides us with the prefix “data -” to define the required properties, and then set the custom properties. <div id=”box1″ data-name=”Musk”></div> <div id=”box2″ data-full-name=”Elon Musk”></div> obtain Use H5 custom attribute object dataset to get let box1 = document.getElementById(‘box1’); let box2 = document.getElementById(‘box2’); box1.dataset.name // Musk box2. dataset.fullName //Elon Musk (hump) box1.getAttribute(‘data-name’) // Musk […]

  • Implementation of CSS custom attribute and spotlight effect


    Is the superstar coming? Come on, chase the light, come on, shoot her. ——Mysterious superstar Who is the superstar? It isCSS Variables 。   brief introduction CSS variables is not so new, but it is definitely a revolution for CSS. Before using variables, we need to use pre-processing tools such as sass and less. Now […]

  • Preliminary understanding of CSS custom attributes


    Today, CSS preprocessors are the standard for Web development. A major advantage of preprocessors is that they enable you to use variables, which helps you avoid copying and pasting code, and simplifies development and refactoring. In this article, you’ll learn how to integrate CSS variables into the CSS development workflow, which makes style sheets easier […]