Category:HTML/CSS

  • JavaScript animation function encapsulation

    Time:2020-12-1

    Simple animation function: animate(obj, target, time, callback); be careful: obj: target object, need to addAbsolute positioning target: target location time: animation interval callback: callback function Code implementation: function animate(obj, target, time, callback) { //First clear the previous timer, and only keep the current timer execution clearInterval(obj.timer); obj.timer = setInterval(function() { //The step value is written […]

  • Six important selectors in CSS (remember in three seconds)

    Time:2020-12-1

    come from:https://blog.csdn.net/qq_44761243/article/details/108227213 What are CSS selectors??? 1. Wildcard (*) Also known as global selector or universal selector, as the name suggests, is to define the style of all elements. It is commonly used in some default styles, such as setting the inner margin of all elements to 2px * {padding: 2px;} to increase the aesthetic […]

  • How to use block annotation in HTML

    Time:2020-12-1

    General comments in HTML: <! — XXXXXXXX — >, where XXXXXXXX is the comment content HTML block comment CSS <! – [if ie] > .<![endif]–> (<!–[if !IE]>||<![endif] Copy code The code is as follows: 1. <! — [if! Ie] > <! — except ie, it can be recognized as <! — <! [ENDIF] — >2. […]

  • vue.js The same element implements click and dblclick to perform different functions

    Time:2020-11-30

    When doing a project, there will always be an element or button, which needs to be processed in different functions under different requirements. Here we take the table table as an example, which I use here vue.js And element   As shown in the figure: (you can click the name or double-click the name)  Functional […]

  • CSS realizes automatic bottom pasting when the content height is not enough

    Time:2020-11-30

    In the process of UI cutting, the page is usually composed of three parts: the head, the content and the bottom. When the content height of the page is not enough to cover the screen, the bottom (foot) will float up with the content. Due to the limited height of the small screen, no abnormality […]

  • HTML beyond text display ellipsis… Through text overflow

    Time:2020-11-30

    You need to apply CSS to div or span at the same time: Copy code The code is as follows: text-overflow:ellipsis; white-space:nowrap; overflow:hidden; To achieve the desired overflow text ellipsis effect.Of course, your page elements should be set to a fixed width, beyond the width will be displayed.

  • Vue3. X starts from scratch (3) — using composition API to optimize components

    Time:2020-11-29

    stayVue3. X starts from scratch (2)It has been described inMixinThis way of extracting common logic However, the data or functions provided by mixin cannot be directly reflected in components As a result, component maintainers need to be very familiar with the introduced mixin objects, otherwise unexpected bugs may occur if the names are duplicated AndComposition […]

  • Explain the problems caused by floating elements and solutions

    Time:2020-11-29

    1、 Questions Multiple floating elements cannot stretch the width of the parent element. The height of the parent element may become 0. If a floating element is followed by a non floating element, the non floating element will float immediately after it. If a floating element is preceded by a sibling element, the page structure […]

  • Div common attributes self collation

    Time:2020-11-29

    1、 Property list Copy code The code is as follows: Color: text colorFont family: Song typefaceFont size: 10pt text sizefont- style:itelic Character slanting Sportsfont- variant:small-caps Small fontLetter spacing: 1pt text spacingLine height: 200% set line heightfont- weight:bold Text in boldvertical- align:sub Subscriptvertical- align:super superscript text-d ecoration:line-through Add? H to remove the wiretext-d ecoration:overline Top linetext-d […]

  • JavaScript carousel

    Time:2020-11-28

    requirement: Mouse through the carousel map module, left and right buttons are displayed, left and right buttons are hidden Click the right button once, and the picture will play to the left, and so on. The left button is the same While the picture is playing, the following small circle module changes with it Click […]

  • CSS3 animation and HTML5 new features

    Time:2020-11-28

    1、 CSS3 animation A kind of CSS3 animation is better and easier than changing the element style dynamically through JavaScript. There are three animation properties in CSS3:transform、transitionandanimation。 1、transform transformThe main elements are used to change the shape:rotate(rotation)scale(zoom)skew(distorted), (distorted), “translate(mobile) andmatrix(matrix distortion).For example: .transform-class { transform : rotate(30deg) scale(2,3); } 1.1. Transform origin base pointAll deformations […]

  • HTML send mail through mailto simple implementation

    Time:2020-11-28

    Recently to the customer’s mailbox of the footers plus Click to send email function, their Baidu next, the solution is very simple Make a simple link Copy code The code is as follows: <a href=” Mailto:[email protected] “> email me</a> 2. Complex linkscode: Copy code The code is as follows: <pre name=”code”><a href=” Mailto:[email protected][email protected]&[email protected]&Subject=Hello&Body= Hello “> […]