【日常记录】【CSS】display:inline 的样式截断
文章目录
- 1. 案例
- 2. css属性:box-decoration-break
- 参考地址
1. 案例
现在有一篇文章,某些句子,是要被标记的,加一些css 让他突出一下
可以看到,在最后,断开了,那如若要让 断开哪里的样式 和 开始 和结束 保持一致,如何处理呢、
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>* {margin: 0;padding: 0;box-sizing: border-box;}div {width: 50vw;margin: auto;}span {background-color: aquamarine;border: 2px solid red;/* box-decoration-break: clone;-webkit-box-decoration-break: clone; */}</style>
</head><body><div>Nestled in the heart of Beijing lies a masterpiece of Chinese architecture and history — the Forbidden City. Thisimperial palace complex, also known as the Palace Museum, spans over 180 acres and captivates visitors with itsgrandeurand historical significance.As one steps through the imposing Meridian Gate, a world of ancient splendor unfolds. The vast courtyards, intricatepavilions, and ornate halls are a testament to the craftsmanship and cultural richness of imperial China. Eachbuildingis adorned with traditional Chinese motifs, from dragon carvings to vibrant ceramic tiles, reflecting the meticulousattention to detail of the Ming and Qing dynasties.<span>The Forbidden City is not only a marvel of architecture but also a sanctuary of natural beauty. Lush gardens,meticulously landscaped over centuries, provide serene retreats amidst the bustling city. The Imperial Garden,withits</span>ancient cypresses and winding pathways, evokes a sense of tranquility and harmony.Beyond its architectural and natural beauty, the Forbidden City holds a rich tapestry of history and culturalheritage.For over 500 years, it served as the political and ceremonial center of the Chinese empire, witnessing the rise andfallof dynasties. Today, it stands as a UNESCO World Heritage Site and a symbol of China's enduring legacy.Visitors to the Forbidden City are transported back in time, exploring the opulent living quarters of emperors, theceremonial halls where imperial edicts were pronounced, and the sacred altars where rituals were performed. The HallofSupreme Harmony, with its golden throne and intricate ceiling decorations, embodies the pinnacle of imperial powerandarchitectural mastery.As the sun sets over the Forbidden City, the vermilion walls and golden roofs glow in the soft evening light,casting amagical aura over the ancient complex. The blend of history, artistry, and natural beauty makes the Forbidden Citynotjust a historical site but a living testament to China's rich cultural heritage.In conclusion, the Forbidden City in Beijing stands as a timeless marvel, where the beauty of architecture, nature,andhistory converge. It remains a must-visit destination for travelers seeking to immerse themselves in the grandeurandlegacy of ancient China.</div>
</body></html>
2. css属性:box-decoration-break
语法
box-decoration-break: slice;
box-decoration-break: clone;
属性值
slice
:元素被按照盒子被切割前的原始样式渲染;默认值
clone
:每个框片段与指定的边框、填充和边距独立呈现。
从这两幅图中就可以看出来区别了,
clone
会是每个片段都是独立呈现
注意,在
webket
内核的浏览器上,是要加一个前缀的,不然不生效
box-decoration-break: clone;-webkit-box-decoration-break: clone;
参考地址
- box-decoration-break MDN 文档
相关文章:

【日常记录】【CSS】display:inline 的样式截断
文章目录 1. 案例2. css属性:box-decoration-break参考地址 1. 案例 现在有一篇文章,某些句子,是要被标记的,加一些css 让他突出一下 可以看到,在最后,断开了,那如若要让 断开哪里的样式 和 开始…...
数据库系统安全
数据库安全威胁 数据库作为信息系统中的核心组成部分,存储和管理着大量敏感和关键的数据,成为网络攻击者的主要目标之一。以下是常见的数据库安全威胁及其详细描述: 一、常见数据库安全威胁 SQL注入攻击(SQL Injectionÿ…...
Qt MV架构-代理模型
一、基本概念 代理模型可以将一个模型中的数据进行排序或者过滤,然后提供给视图进行显示。 Qt中提供了QSortFilterProxyModel作为标准的代理模型来完成模型中数据的排序和过滤。 要使用一个代理模型,则只需要为其设置源模型,然后再视图中使…...

WebSocket实现群聊功能、房间隔离
引用WebSocket相关依赖 <dependency><groupId>javax.websocket</groupId><artifactId>javax.websocket-api</artifactId><version>1.1</version></dependency><dependency><groupId>org.springframework</grou…...

顶顶通呼叫中心中间件实现随时启动和停止质检(mod_cti基于FreeSWITCH)
文章目录 前言联系我们拨号方案启动停止ASR执行FreeSWITCH 命令接口启动ASR接口停止ASR接口 通知配置cti.json配置质检结果写入数据库 前言 顶顶通呼叫中心中间件的实时质检功能是由两个模块组成:mod_asr 和 mod_qc。 mod_asr:负责调用ASR将用户们在通…...

基于conda包的环境创建、激活、管理与删除
Anaconda是一个免费、易于安装的包管理器、环境管理器和 Python 发行版,支持平台包括Windows、macOS 和 Linux。下载安装地址:Download Anaconda Distribution | Anaconda 很多不同的项目可能需要使用不同的环境。例如某个项目需要使用pytorch1.6&#x…...
处理线程安全的列表CopyOnWriteArrayList 和Collections.synchronizedList
ConcurrentModificationException 是 Java 中的一种异常,用于指示在迭代集合时,该集合的结构发生了并发修改。 在 Java 中,许多集合类(如 ArrayList, HashMap 等)都不是线程安全的。如果一个线程在迭代集合的同时&…...

技术成神之路:设计模式(六)策略模式
1.介绍 策略模式(Strategy Pattern)是一种行为型设计模式,它定义了一系列算法,封装每一个算法,并使它们可以相互替换。策略模式使得算法的变化独立于使用算法的客户端。 2.主要作用 策略模式的主要作用是将算法或行为…...
华为OD机考题(HJ90 合法IP)
前言 经过前期的数据结构和算法学习,开始以OD机考题作为练习题,继续加强下熟练程度。 描述 IPV4地址可以用一个32位无符号整数来表示,一般用点分方式来显示,点将IP地址分成4个部分,每个部分为8位,表示成…...

值得关注的数据资产入表
不错的讲解视频,来自:第122期-杜海博士-《数据资源入表及数据资产化》-大数据百家讲坛-厦门大学数据库实验室主办第122期-杜海博士-《数据资源入表及数据资产化》-大数据百家讲坛-厦门大学数据库实验室主办-20240708_哔哩哔哩_bilibili...
Postman API性能测试:解锁高级技巧的宝库
🚀 Postman API性能测试:解锁高级技巧的宝库 在API开发和测试过程中,性能测试是确保API稳定性和可靠性的关键环节。Postman作为API测试的强大工具,提供了多种性能测试功能和高级技巧,帮助开发者深入分析API的性能表现…...

stm32中断详解
stm32中断详解 文章目录 stm32中断详解1.什么是中断?1.STM32中断系统特点2.中断处理流程3.中断配置与使用 2.AFIO寄存器3.NVIC寄存器3.中断分组、抢占优先级和响应优先级1. 中断分组2. 抢占优先级3. 响应优先级4.配置与应用 4.中断服务函数5.配置中断流程1.配置外设…...
【LeetCode】最小栈
目录 一、题目二、解法完整代码 一、题目 设计一个支持 push ,pop ,top 操作,并能在常数时间内检索到最小元素的栈。 实现 MinStack 类: MinStack() 初始化堆栈对象。 void push(int val) 将元素val推入堆栈。 void pop() 删除堆栈顶部的元…...

链接追踪系列-09.spring cloud项目整合elk显示业务日志
准备工作: 参看本系列之前篇:服务器安装elastic search 本机docker启动的kibana-tencent 使用本机安装的logstash。。。 本微服务实现的logstash配置如下: 使用腾讯云redis 启动本机mysql 启动本机docker 启动nacos,微服务依赖它作为…...
老年生活照护实训室:让养老护理更个性化
本文探讨了老年生活照护实训室在实现养老护理个性化方面的重要作用。通过分析其提供的实践环境、专业培训、模拟案例和评估机制,阐述了如何培养护理人员的个性化服务能力,以满足老年人多样化的需求,提高养老护理的质量和满意度。 在老龄化社会…...
c++课后作业
把字符串转换为整数 int main() {char pn[21];cout << "请输入一个由数字组成的字符串: ";cin >> pn;int last 0;int res[10];int j strlen(pn);int idx 2;cout << "请选择(2-二进制,10-十进制…...

SpringBoot+Vue实现简单的文件上传(txt篇)
SpringBootVue实现简单的文件上传 1 环境 SpringBoot 3.2.1,Vue 2,ElementUI 2 页面 3 效果:只能上传txt文件且大小限制为2M,选择文件后自动上传。 4 前端代码 <template><div class"container"><el-…...
LLMs之RAG:GraphRAG(本质是名词Knowledge Graph/Microsoft微软发布)的简介、安装和使用方法、案例应用之详细攻略
LLMs之RAG:GraphRAG(本质是名词Knowledge Graph/Microsoft微软发布)的简介、安装和使用方法、案例应用之详细攻略 导读:2024年7月3日,微软正式开源发布GraphRAG。GraphRAG可以提高大型语言模型在私有数据集上的推理能力。 背景痛点࿱…...
Linux 之前的 Unix 桌面沉浮启示录
It takes more than open source, it takes open standards and consensus 仅仅开源还不足以实现开放,还需开放标准和建立共识 Steven J. Vaughan-Nichols Sat 27 Jan 2024 // 12:33 UTC 现在,由于有了安卓和 ChromeOS,Linux 已成为重要的终端…...
面试问题梳理:项目中防止配置中的密码泄露-Jasypt
背景 想起面试的时候,面试官问我现在大家用Spring框架,数据库、ES之类的密码都是配置在配置文件中的,有很大的安全隐患,你有考虑过怎么解决嘛? 当时我回答是可以在项目启动的过程中的命令行追加的方式,感觉…...

(LeetCode 每日一题) 3442. 奇偶频次间的最大差值 I (哈希、字符串)
题目:3442. 奇偶频次间的最大差值 I 思路 :哈希,时间复杂度0(n)。 用哈希表来记录每个字符串中字符的分布情况,哈希表这里用数组即可实现。 C版本: class Solution { public:int maxDifference(string s) {int a[26]…...
【Linux】shell脚本忽略错误继续执行
在 shell 脚本中,可以使用 set -e 命令来设置脚本在遇到错误时退出执行。如果你希望脚本忽略错误并继续执行,可以在脚本开头添加 set e 命令来取消该设置。 举例1 #!/bin/bash# 取消 set -e 的设置 set e# 执行命令,并忽略错误 rm somefile…...
Leetcode 3576. Transform Array to All Equal Elements
Leetcode 3576. Transform Array to All Equal Elements 1. 解题思路2. 代码实现 题目链接:3576. Transform Array to All Equal Elements 1. 解题思路 这一题思路上就是分别考察一下是否能将其转化为全1或者全-1数组即可。 至于每一种情况是否可以达到…...
golang循环变量捕获问题
在 Go 语言中,当在循环中启动协程(goroutine)时,如果在协程闭包中直接引用循环变量,可能会遇到一个常见的陷阱 - 循环变量捕获问题。让我详细解释一下: 问题背景 看这个代码片段: fo…...

遍历 Map 类型集合的方法汇总
1 方法一 先用方法 keySet() 获取集合中的所有键。再通过 gey(key) 方法用对应键获取值 import java.util.HashMap; import java.util.Set;public class Test {public static void main(String[] args) {HashMap hashMap new HashMap();hashMap.put("语文",99);has…...

华为OD机试-食堂供餐-二分法
import java.util.Arrays; import java.util.Scanner;public class DemoTest3 {public static void main(String[] args) {Scanner in new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextLine()) { // 注意 while 处理多个 caseint a in.nextIn…...
Android Bitmap治理全解析:从加载优化到泄漏防控的全生命周期管理
引言 Bitmap(位图)是Android应用内存占用的“头号杀手”。一张1080P(1920x1080)的图片以ARGB_8888格式加载时,内存占用高达8MB(192010804字节)。据统计,超过60%的应用OOM崩溃与Bitm…...

初学 pytest 记录
安装 pip install pytest用例可以是函数也可以是类中的方法 def test_func():print()class TestAdd: # def __init__(self): 在 pytest 中不可以使用__init__方法 # self.cc 12345 pytest.mark.api def test_str(self):res add(1, 2)assert res 12def test_int(self):r…...
rnn判断string中第一次出现a的下标
# coding:utf8 import torch import torch.nn as nn import numpy as np import random import json""" 基于pytorch的网络编写 实现一个RNN网络完成多分类任务 判断字符 a 第一次出现在字符串中的位置 """class TorchModel(nn.Module):def __in…...

JVM虚拟机:内存结构、垃圾回收、性能优化
1、JVM虚拟机的简介 Java 虚拟机(Java Virtual Machine 简称:JVM)是运行所有 Java 程序的抽象计算机,是 Java 语言的运行环境,实现了 Java 程序的跨平台特性。JVM 屏蔽了与具体操作系统平台相关的信息,使得 Java 程序只需生成在 JVM 上运行的目标代码(字节码),就可以…...