html - 制作带边框的框,在html中划分
问题描述
你好,我想在 html 中制作盒子,在里面我想添加倾斜的分隔线。我怎样才能做到这一点?
我想完全按照这张图片制作:https ://drive.google.com/open?id=1EBDZJNHxtQxwDctjL239hMDjiEW4w48W
我做到了这一点,但并没有像图片一样对齐。
<div class="box">
<p style="text-align: left;"><u>प्रेषक</u><br><br>देवका अर्याल <br>लुम्बिनी पुस्तक पसल <br>बुटवल-८, रूपन्देही <br>लुम्बिनी, नेपाल</p>
<p style="text-align: right;"><u>प्रापक</u><br><br>श्रीमान् महाप्रबन्धक <br>साझा बिक्री कक्ष <br>भृकुटी मण्डप, काठमाडौं, नेपाल</p>
</div>
解决方案
我希望这对你有帮助!
.box {
background: #fff;
border: 1px solid #000;
box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 8px #000;
width: 100%; /* The width you want. */
padding: 1em;
box-sizing: border-box;
position: relative;
overflow: hidden;
}
.box::before {
width: 1px;
content: "";
background: #000;
position: absolute;
top: 4px;
left: 50%;
bottom: 4px;
transform: skew(45deg)
}
.box .leftSide {float:left;}
.box .rightSide {float:right;}
<div class="box">
<div class="leftSide"><u>प्रेषक</u><br><br>देवका अर्याल <br>लुम्बिनी पुस्तक पसल <br>बुटवल-८, रूपन्देही <br>लुम्बिनी, नेपाल</div>
<div class="rightSide"><u>प्रापक</u><br><br>श्रीमान् महाप्रबन्धक <br>साझा बिक्री कक्ष <br>भृकुटी मण्डप, काठमाडौं, नेपाल</div>
</div>
推荐阅读
- reactjs - 如何在 jest/enzyme 中的表单提交处理程序后测试函数和内部语句反应
- r - 遍历行,查找具有匹配索引的匹配字符,如果是这样:在另一列中放入“1” - R
- ios - 使用 react native 集成安装 pod 时出错 -
- git - 如何在 git 存储库中显示所有已提交文件的列表,直到最后一次提交?
- javascript - 反应找不到模块
- python - 如何将打印输出保存到 Excel 表格中
- mysql - Return list of words that appear directly before "word of interest"
- c - 理解-指向结构的指针
- r - R Shiny - 尝试使用响应式和 ActionButton 循环
- fortran - 错误 #6366:数组表达式的形状不符合。[EPS1] 即使我没有使用数组,我也会收到此错误