html - 页面部分中心需要徽标,不包括方形空间中的左侧边栏
问题描述
网站:https : //wells-demo.squarespace.com/ 页面中心需要徽标,不包括所有格式移动设备、桌面等方格 WELLS 模板中的左侧边栏(标题)。我想弄清楚但没有结果。以下是我的代码
$(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;
}
}
注意:在当前形式下,您的问题对未来的访问者并没有真正有用。
推荐阅读
- c# - 如何为不同的 SQL Server 文件夹运行相同的 angularjs 应用程序(.NET MVC 5)?
- c# - 带有进度条的 ASP.NET WebForms 文件上传
- python - 如何将包含存储为文本和数字的值的 Pandas 列分成两个单独的列
- javascript - NodeJS:在迭代之间等待的异步循环
- javascript - 为什么 process.env 在模块中未定义?
- apollo - 深度大于 1 的嵌套解析器
- c - 如果在 atexit 处理程序内部发生退出会发生什么?
- python - 创建到 Windows 文件夹的链接
- c# - 获取 System.FormatException:输入字符串的格式不正确。创建工作流时
- c - 我如何在不使用数组的情况下解决问题,因为数组现在对我来说很复杂?