• Null and undefined in JavaScript


    1. An overview of the   Null and undefined belong to two different basic data types in js, both of which can mean “no” and have very similar meanings. Assigning a variable to undefined or null makes little difference, frankly. And in the judgment condition of the if statement, they are automatically converted to false, the […]

  • Use an iframe to display a screenshot of the weather effects in a web page


    css: Copy the code The code is as follows: *{margin:0;padding:0;list-style-type:none;} a,img{border:0;} Body {font:12px/180% Arial, Helvetica, sans-serif, “new song style “; }/* demo */ .demo{width:800px;margin:0 auto;} .demo div{margin:40px 0 0 0;} html: Copy the code The code is as follows: <div> <div> <iframe name=”weather_inc” src=”″ width=”650″ height=”70″ frameborder=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no”></iframe> </div> <div> <iframe name=”weather_inc” src=”″ […]

  • CSS use relative to set top as the percentage value (imitate baidu homepage)


    Preface: Recently in the process of learning HTML, CSS, want to imitate baidu home page. I found that the blank distance between this part of the search box and other elements above and below can change with the size of the window (the effect is shown in the figure below), so I studied it and […]

  • Pure CSS to achieve traffic light effect (common in interview)


    Let’s look at the questions first, not the answers~_~ 1. What is the output content of the following code? function O(name){||’world’; } O.prototype.hello=function(){ return function(){ console.log(‘hello ‘ } } var o=new O; var hello=o.hello(); hello(); Analysis: 1. When class o is instantiated, an attribute name is assigned, and the default value is world. Then, […]

  • Use of plug-ins


    In the process of learning and interviewing, we will focus on the original things, but in the actual development process, we seldom use the original to write projects. The first tier cities are Vue, react, and angular, and jQuery is also used, but it is less than the second tier cities, but not none. JQuery […]

  • How to use DL (DT, DD), UL (LI), ol (LI) in HTML


    HTML < DL > tags #Definition and usage The < DL > tag defines the definition list.The < DL > tag is used to combine < DT > (defining items in the list) and < DD > (describing items in the list). Case study Copy code The code is as follows: <dl>< DT > Computer […]

  • HTML head header tag details


    There are a lot of tags and elements in the HTML head part, which involves the rendering of web pages by browsers, SEO and so on. Each browser kernel and each domestic browser manufacturer have their own tag elements, which makes a lot of differences. In the era of mobile Internet, head structure and meta […]

  • Event flow and dom2 level event binding


    The event process is divided into three stages: capture stage, target stage and bubbling stage. Capture phase: events are executed from the top-level elements, layer by layer down to the precise elements. Target phase: the event executes on the exact element. Bubbling stage: events are executed from the precise elements, layer by layer, up to […]

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

  • Soft technology leads you to learn the front end: Javascript output


    JavaScript does not provide any built-in print or display functions. JavaScript display scheme JavaScript can “display” data in different ways: UseWindow. Alert(), write warning box UseDocument. Write(), write HTML output UseInnerHTML writes HTML elements UseConsole. Log(), write to browser console Using innerHTML To access HTML elements, JavaScript uses theDocument.getelementbyid (ID) method. The ID attribute defines […]

  • HTML vertical column display text let text vertical column display


    Copy code The code is as follows: < span style =’display: block; width: 14px; line height: 50px; height: 100px; ‘> Text Test</span> Display effect: writing word measure try If it’s English letters and numbers, it will show this effect. writing word zzzzzzz 123435

  • Example of gradual text effect under CSS3


    1. Method 1: use mask image attribute If your browser is chrome or Safari, you can see the following effects in the demo page: Method 1 text gradient effect The corresponding HTML code is as follows: < H2 class = “text grade” data text = “gifted beauty” > gifted beauty</h2> The CSS code corresponding to […]