当前位置:网站首页>display,visibility,opacity
display,visibility,opacity
2022-08-02 03:40:00 【suzhiwei_boke】
The difference between display, visibility and opacity
Common point: All elements can be hidden and invisible
Difference:
display: none
(1) DOM structure: browserElements whose display attribute is none will not be rendered, and do not occupy space;
(2) Event monitoring: DOM event monitoring cannot be performed;
(3) Performance: Dynamically changing this attribute will cause rearrangement, and the performance is poor;
(4) Inheritance: will not be inherited by child elements, after all, subclasses will not be rendered;
(5) transition: transition does not support display.
visibility: hidden
(1) DOM structure: elements are hidden, but will be rendered and will not disappear, occupying space;
(2) Event monitoring: DOM event monitoring cannot be performed;
(3) Performance: Dynamically changing this property will cause redrawing, and the performance is high;
(4) Inheritance: It will be inherited by child elements, and child elements can be unhidden by setting visibility: visible;
(5) transition: transition supports visibility.
opacity: 0
(1) DOM structure: the transparency is 100%, the element is hidden, occupying space;
(2) Event monitoring: DOM event monitoring can be performed;
(3) Performance: improvedIt is a composite layer, it will not trigger redraw, and the performance is high;
(4) Inheritance: it will be inherited by child elements, and child elements cannot be unhidden by opacity: 1;
(5) transition: transitionOpacity is supported.
The bottom layer of v-show is the display attribute of the operation element
The bottom layer of v-if is the creation/destruction of the control element (create and delete dom)
边栏推荐
- Advanced gradient of skeleton effect, suitable for waiting for pictures
- parser = argparse.ArgumentParser()解析
- L1-020 帅到没朋友 (20分)
- Living to detect the Adaptive Normalized Representation Learning for GeneralizableFace Anti - Spoofing reading notes
- C语言 内联函数
- debian 10 nat and routing forwarding
- 排序学习笔记(二)堆排序
- 这些JS题面试时一定要答对!
- The usage of json type field in mysql
- Knowledge Engineering Assignment 2: Introduction to Knowledge Engineering Related Fields
猜你喜欢

Chemical reagent Phospholipid-polyethylene glycol-hydroxyl, DSPE-PEG-OH, DSPE-PEG-Hydroxyl, MW: 5000

DSPE-PEG-DBCO Phospholipid-Polyethylene Glycol-Dibenzocyclooctyne A Linear Heterobifunctional Pegylation Reagent

【装机】老毛桃的安装及使用

Circular linked list---------Joseph problem

Debian 10 NTP Service Configuration

Knowledge Engineering Assignment 2: Introduction to Knowledge Engineering Related Fields

Phospholipid-polyethylene glycol-hydrazide, DSPE-PEG-Hydrazide, DSPE-PEG-HZ, MW: 5000

Phospholipid-Polyethylene Glycol-Aldehyde DSPE-PEG-Aldehyde DSPE-PEG-CHO MW: 5000

require模块化语法

DSPE-PEG-Silane, DSPE-PEG-SIL, phospholipid-polyethylene glycol-silane modified active group
随机推荐
C语言的变长数组
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boo
AttributeError: Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from ‘/yolov5-5.0/models/commo
Customer Rating Control
微信小程序实现文本安全监测
Problems when yolov5 calls ip camera
js 数组去重的常用方法
Chapter 10 Clustering
函数提升和变量提升
我的小笔记 =》原生微信小程序
L1-020 帅到没朋友 (20分)
The usage of json type field in mysql
querystring模块
__dirname
微信小程序云开发-证件照的实现
JJWT tool class
啃瓜记录第一天
UserWarning:火炬。meshgrid:在以后的版本中,它将被要求通过索引ing argu
A senior test engineer asked me these questions as soon as the interview came
C语言 十六进制整数字符串转十进制整数