【发布时间】:2020-07-08 19:56:35
【问题描述】:
这里有人用Elementor吗?
我正在尝试使用Elementor 创建一个标题。 3 列,左侧有一个徽标,中间有一个搜索栏,右侧有一个导航菜单。
基本上,我想要实现的是这样的。 Expected Output
但我目前所做的是Output
在其上添加边框Output-with-Border
这是调整屏幕/窗口大小时的问题Issue
应该是这样的Expected-output-on-resize
为了给你更多细节,我想在 Elementor 上实现与以下代码相同的功能。
.container {
margin: 0;
padding: 0;
list-style-type: none;
display: flex;
flex-wrap: wrap;
}
.flex {
background: #6AB6D8;
padding: 10px;
margin-bottom: 50px;
border: 3px solid #2E86BB;
color: white;
font-size: 20px;
text-align: center;
position: relative;
}
.flex:after {
position: absolute;
z-index: 1;
left: 0;
top: 100%;
margin-top: 10px;
width: 100%;
color: #333;
font-size: 18px;
}
.flex1 {
flex-basis: auto;
}
.flex1:after {
content: 'auto';
}
.flex2 {
flex: 1;
flex-basis: fill;
}
.flex2:after {
content: 'fill-remaining-space';
}
.flex3 {
flex-basis: min-content;
}
.flex3:after {
content: 'min-content';
}
<ul class="container">
<li class="flex flex1"><div style="background: #000; width: 200px;">Logo</div></li>
<li class="flex flex2"><div style="background: #000; width: 100%; margin-right: 10px; margin-left-10px;">Search-Bar</div></li>
<li class="flex flex3"><div style="background: #000; width: 350px;">Navigation Menu</div></li>
</ul>
【问题讨论】:
-
您使用的是 Elementor Pro,它是
Search-Bar、Navigation Menu和Logo的默认小部件吗? -
不,我只是在使用免费版的 Elementor。对于
SearchBar,我使用的是Advanced Woo Search,而Logo是Custom Header Logo,我不确定它是否包含在 Elementor 免费版中,但它在小部件列表中,其功能是与默认徽标相同,因此我使用它,Navigation Menu来自OceanWP 插件,它也是免费版本。 -
太好了,查看我发布的答案。