gpt4 book ai didi

css - "Short"xaringan/remark 列之间的垂直边框

转载 作者:行者123 更新时间:2023-11-28 14:26:52 24 4
gpt4 key购买 nike

如何在 xaringan/remark 中的列之间创建“短”垂直边框?

我想在我的幻灯片中的列之间添加一个垂直边框,但它只有 div 高度的 80% 左右。这是两列布局的 xaringan 示例:https://slides.yihui.name/xaringan/#15

我想左列边框的 css 看起来像这样:

.pull-left {
border-right-width: 1px;
border-right-style: solid;
padding-right: 2px
}

但是我怎样才能让它比 div 的高度短一点呢?

最佳答案

是的,你可以从父div创建80%的高度

<div></div>

div {
height:200px;
width:500px;
background:gold;
position:relative;
border-top:10px solid grey;
border-bottom:2px solid #000;
}
div:after {
content:"";
position:absolute;
top:20%;
right:0;
width:2px;
height:60%;
background:#000;
}

关于css - "Short"xaringan/remark 列之间的垂直边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54613173/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com