当前位置:网站首页>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)
边栏推荐
- Common methods of js array deduplication
- Basic usage of Monaco Editor
- oracle inner join and outer join
- 微信小程序云开发之模糊搜索
- Scientific research reagent DMPE-PEG-Mal dimyristoylphosphatidylethanolamine-polyethylene glycol-maleimide
- L1-020 帅到没朋友 (20分)
- 网址URL
- ModuleNotFoundError No module named 'xxx' possible solutions
- cross-domain problem solving
- 微信小程序自定义swiper轮播图面板指示点|小圆点|进度条
猜你喜欢

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

DOM manipulation---magnifying glass case

1.uview form校验位置可以改变 2.时间区间

URL模块

Phospholipid-polyethylene glycol-azide, DSPE-PEG-Azide, DSPE-PEG-N3, MW: 5000

Knowledge Engineering Assignment 2: Introduction to Knowledge Engineering Related Fields

nucleo stm32 h743 FREERTOS CUBE MX配置小记录

C语言入门小游戏—三子棋

Deveco studio Hongmeng app access network detailed process (js)

js basics
随机推荐
vue3 访问数据库中的数据
环形链表---------约瑟夫问题
微信小程序云开发如何将页面生成为pdf?
3 minutes to take you to understand WeChat applet development
AttributeError: Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from ‘/yolov5-5.0/models/commo
Phospholipid-Polyethylene Glycol-Aldehyde DSPE-PEG-Aldehyde DSPE-PEG-CHO MW: 5000
C语言 十六进制整数字符串转十进制整数
语义分割标签即像素值的巨坑,transforms.ToTensor()的错误使用
一个结构体 = 另一个结构体(同类型结构体之间可直接赋值操作)
相对路径和绝对路径
DSPE-PEG-Silane, DSPE-PEG-SIL, phospholipid-polyethylene glycol-silane modified active group
解决glob()返回文件排序不一致问题&onnx本地按照安装方法
【面试】失败的一次面试
骨架效果 之高级渐变,适用图片等待时
--fs模块--
The difference between the knowledge question and answer session with the knowledge
每天填坑,精卫填坑第二集,TX1 配置从固态启动,安装Pytorch
钟表刻度线
微信小程序九宫格抽奖和转盘抽奖的实现
The @autowired distinguished from @ the Resource