如何在wordpress中的一行中显示面包屑?

用户14922462

我在 php 中有一个代码来显示它像这样输出的面包屑

我找到了php代码
输出的链接
<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%,但我不知道如何像图像一样显示框阴影

请告诉如何。感谢您的帮助

图像桌面

图片移动

厄兹古尔萨

编辑:我删除了绝对定位方法,将其居中并使其响应。

.crumbswrapper {text-align: center;}
#crumbs {
  text-align: left;
  display: inline-block;
  font-family: roboto;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 12px;
}
.innerwrap {
  display: inline-block;
  background:#4489ff;
  padding-right: 10px;
  margin: 0 0 0 -5px;
}
.innerwrap:last-child {
  background: none;
}
.innerwrap:nth-last-child(2) {
  background: #eef5ff;
}
#crumbs a, #crumbs span {
  background:#4489ff;
  border-radius: 0 20px 20px 0;
  box-shadow: 5px 0 10px -4px #444;
  color: white;
  padding: 10px 25px 10px 20px;
  text-decoration: none;
  white-space: nowrap;
  line-height: 34px;
}
.innerwrap:nth-last-child(2) a {
  box-shadow: none!important;
}

#crumbs span.current{
  background: #eef5ff !important;
  box-shadow: none!important;
  white-space: nowrap;
  color: #4489ff!important; 
}
<div class="crumbswrapper">
  <div id="crumbs">
    <div class="innerwrap"><a href="http://localhost">Home</a></div>
    <div class="innerwrap"><a href="http://localhost/about/">About The Tests</a></div>
    <div class="innerwrap"><span class="current">Page Image Alignment</span></div>
  </div>
</div>

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

如何在Wordpress中从面包屑中删除“主页”

WordPress中的面包屑菜单

如何在 opencart 中创建面包屑

如何在Eclipse中禁用面包屑

Bootstrap如何在面包屑组件中添加“ /”?

如何在可视代码中复制HTML面包屑?

如何在magento的面包屑页面中显示类别描述?

如何在此面包屑模式 JSON 生成器中显示位置编号

面包屑在angularjs中如何使用?

ZF2导航。如何在面包屑中显示页面,但在菜单中隐藏该页面?

如何在Visual Studio Code上显示面包屑?

在 Wordpress 中更改面包屑“商店”文本 WooCommerce

面包屑未显示在母版页中

在面包屑列表中突出显示第二项

父网站未显示在SharePoint 2013的面包屑中

WordPress的面包屑最后一个元素不在标签中

如何在Vue.js中的URL面包屑中获取路径的参数

如何始终显示鹦鹉螺中的所有面包屑?

如何从Yoast面包屑中删除父类别

如何在Nuxt.js中创建动态的“面包屑”

如何在Schema.org中向产品添加面包屑?

使用MVC站点地图时,如何在面包屑中更改父级父级?

如何在Bootstrap 4中的面包屑元素右边插入按钮?

如何在Magento 2中为子主题添加和应用面包屑.phtml?

如何在Visual Studio Code中删除代码结构视图或“面包屑”?

我如何在TYPO3的Extbase Frontent插件中获得根线/面包屑

如果点数太多,如何在分页或面包屑中创建点

在Flutter中添加Sentry面包屑

面包屑中的 CakePHP 内容计数