网站:https://wells-demo.squarespace.com/ 在所有格式的移动设备、桌面设备等的方形空间 WELLS 模板中,页面部分中心需要 Logo ,不包括左侧边栏(标题)。我想弄清楚,但没有结果。以下是我的代码
$(document).ready(function(){
$('#headerWrapper #header ').after('<div id="logo1" data-content-field="site-title"><h1 class="logo image" data-shrink-original-size="23" style="letter-spacing: 0.0869565em;"><a href="/"><img src="//static1.squarespace.com/static/5adfd10929711421a9b29d21/t/5adfdbac562fa79909bad158/1524908392416/?format=750w" alt="L ETO BRIDAL" width="130" height=50"></a></h1></div>');
});
#logo{display:none;}
#headerWrapper{top:4px!important}
#logo1 h1 a img {
height:70px!important;
}
#logo1 {
left: 300%;
position: absolute;
text-align: center !important;
top: 10px !important;
transform: translateX(-50%);
最佳答案
根据您当前的 CSS,应该这样做:
#logo {
width: 100%;
text-align: center;
}
@media (min-width: 801px) {
#logo {
position: fixed;
width: calc(100% - 340px);
top: 0;
margin-left: 240px;
box-sizing: border-box;
background-color: #ffffff85;
padding: .5rem 0;
border-bottom: 1px solid #fff;
}
}
注意:在当前形式下,您的问题对 future 的访问者并没有多大用处。
关于html - 页面部分中心需要 Logo ,不包括方形空间中的左侧栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50079280/