【发布时间】:2021-01-05 11:30:26
【问题描述】:
我在 php 中有一个代码来显示它像这样输出的面包屑
the link i found the php code
输出 <div id="crumbs"><a href="http://localhost">Home</a> » <a href="http://localhost/about/">About The Tests</a> » <span class="current">Page Image Alignment</span></div>
它看起来像这样
#crumbs a,
#crumbs span {
border-radius: 0px 10px 10px 0px;
box-shadow: -3px 2px 18px -3px #000;
background: #4489ff;
width: max-content;
display: inline-block;
color: white;
font-size: 17px;
padding: 6px;
font-weight: bolder;
margin-left: -1px;
margin-top: 1rem;
text-decoration: none;
}
#crumbs span.current{
background: #eef5ff !important;
color: black !important;
}
<center>
<!-- Do Not use <center> tag ! !-->
<div id="crumbs"><a href="http://localhost">Home</a> <a href="http://localhost/about/">About The Tests</a> <span class="current">Page Image Alignment</span></div>
<!-- Do Not use </center> tag ! !-->
</center>
我想把面包屑做成单行并且喜欢这样。 我已经完成了 90%,但我不知道如何像图像一样显示盒子阴影
请告诉我怎么做。 感谢您的帮助!
【问题讨论】:
-
这只是您尚未在此处发布的样式...您正在寻找浮动、边框半径和框阴影。应该就是这些了。
-
请告诉我如何评价你的评论
-
可能类似于
#crumbs a {border-radius-right: 50%; box-shadow: 3px 3px 6px #787878; background: #0000FF; text: #fff; float: left;和活动页面跨度反向背景和文本颜色 -
代码看起来仍然不错,但我需要完全一样,我也需要它居中对齐,但我赞成你的评论谢谢朋友
-
@QuestionsBoy 您需要通过在编辑器中使用 sn-p 提供一个最小的可重现示例。这样我或其他人就可以修复代码中不起作用的问题。 stackoverflow.com/help/minimal-reproducible-example
标签: html css wordpress breadcrumbs