html - 页面部分中心需要 Logo ,不包括方形空间中的左侧栏

标签 html css header squarespace

网站: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%);

enter image description here

最佳答案

根据您当前的 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/

相关文章:

php - 想要部分上传大文件。 HTML/PHP

html - CSS <hr> 宽度过渡

php - Wordpress 添加按钮链接

jquery - 表定位不起作用

javascript - 如何使标题在向下滚动时隐藏,并在向上滚动 5 倍时显示(如 google+)?

Angular HttpClient.get() 不返回完整的响应头

javascript - 将数据附加到表中作为变量

html - 在 CSS 中模拟选项卡

gcc - gcc 的 --sysroot 开关的替代方案?

javascript - Jquery:单击时更改按钮及其同级按钮的属性