当前位置:网站首页>Padding percentage operation
Padding percentage operation
2022-06-26 17:55:00 【Dandan's servant】
stay css Inside padding The value can also be set as a percentage
- 1. If position The attribute is static 、 relative or sticky, The containing block is the block level element of the nearest ancestor of the element content decision
- 2. If position The attribute is absolute、fixed, Include blocks plus padding, namely content + padding.
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title></title>
<style> body {
width: 1000px; height: 500px; padding: 100px; } .out {
position: relative; width: 200px; height: 100px; padding: 10%; } .inner {
position: absolute; width: 100px; height: 50px; padding: 10%; } </style>
</head>
<body>
<div class="out">
<div class="inner">inner</div>
</div>
</body>
</html>

边栏推荐
- [code Capriccio - dynamic planning] t583. Deleting two strings
- Daily record 2
- Detailed explanation of browser storage methods: the origin and difference of cookies, localstorage and sessionstorage
- 14 MySQL tutorial insert insert data
- 同花顺开户怎么样安全吗?怎么炒股开户
- How to open a stock account? Is it safe to open an account online now?
- 有依赖的背包问题
- 行锁分析和死锁
- Leetcode HOT100 (22--- bracket generation)
- Leetcode - 226. Retourner l'arbre binaire (bfs)
猜你喜欢

宝藏又小众的CTA动画素材素材网站分享

Various types of gypsum PBR multi-channel mapping materials, please collect them quickly!

Detailed explanation of dos and attack methods

物联网协议的王者:MQTT

Plt How to keep show() not closed

【uniapp】uniapp手机端使用uni.navigateBack失效问题解决

类型多样的石膏PBR多通道贴图素材,速来收藏!

RuntimeError: CUDA error: out of memory自己的解决方法(情况比较特殊估计对大部分人不适用)

sparksql如何通过日期返回具体周几-dayofweek函数

next(iter(dataloader))的一点点体会
随机推荐
关于FlowUs这一款国民好笔记
Leetcode - 226. Retourner l'arbre binaire (bfs)
无需人工先验!港大&同济&LunarAI&旷视提出基于语义分组的自监督视觉表征学习,显著提升目标检测、实例分割和语义分割任务!
padding百分比操作
[qt learning notes]qt inter thread data communication and data sharing
MySQL exports all table indexes in the database
背包问题求方案数
【QNX】命令
牛客网:设计LRU缓存结构 设计LFU缓存结构
并发之Synchronized说明
Leetcode topic [array] -283- move zero
在国金证券开户怎么样?保障安全吗?
Data Encryption Standard DES security
Redis and database data consistency
[buuctf.reverse] 126-130
Prometeus 2.34.0 new features
如何将应用加入到deviceidle 白名单?
wechat_微信小程序中解决navigator进行页面跳转并传递参数问题
LeetCode——226. Flip binary tree (BFS)
Detailed explanation of dos and attack methods