display: run-in

If a sibling block box (that does not float and is not absolutely positioned) follows the run-in box, the run-in box becomes the first inline box of the block box.
如果兄弟元素不是浮动和绝对定位,那么就会表现得像紧接着那个块元素的第一个行内元素
 
A run-in cannot run in to a block that already starts with a run-in or that itself is a run-in.
不可以跑进已经由run in开头,或者本省就是run in的元素里
 
If the run-in element contains anything block-level, it becomes block-level
 

可以让标题和后面的文字出现在同一行,不用牺牲语义化,用其他方式实现容易遇到各种问题

h3{display:run-in}
 
例如用float来实现,会错开
 
如果把标题变为inline元素,那么如果后面跟着一个图片,他就不会自动换行
 

转载于:https://www.cnblogs.com/chuangweili/p/5163797.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
[INFO] Scanning for projects... [INFO] [INFO] ---------------< com.longshare.ta:parameter-center-run >---------------- [INFO] Building parameter-center-run 2023.7-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The POM for com.longshare.ta:parameter-center-support:jar:2023.7-SNAPSHOT is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.463 s [INFO] Finished at: 2023-07-16T21:44:34+08:00 [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "as" could not be activated because it does not exist. [ERROR] Failed to execute goal on project parameter-center-run: Could not resolve dependencies for project com.longshare.ta:parameter-center-run:jar:2023.7-SNAPSHOT: Failure to find com.longshare.ta:parameter-center-support:jar:2023.7-SNAPSHOT in https://repo.91asl.com:9443/nexus/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of maven-public has elapsed or updates are forced -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException Process finished with exit code 1
最新发布
07-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值