Html 如何通过CSS隐藏论文的社交共享
我想使用Disqs评论系统作为婚礼网站上基于bootstrap/html5模板的留言簿 由于网站上的内容是个人的,我想删除Facebook、Twitter等出现在评论框上方和每个评论下方的共享链接 这里截图 有没有办法通过在CSS中隐藏共享元素来实现这一点 我知道新的discus使用了一个iframe,但是有一个类似的线程用于隐藏discus的页脚,下面的CSS代码确实有效Html 如何通过CSS隐藏论文的社交共享,html,css,styles,stylesheet,disqus,Html,Css,Styles,Stylesheet,Disqus,我想使用Disqs评论系统作为婚礼网站上基于bootstrap/html5模板的留言簿 由于网站上的内容是个人的,我想删除Facebook、Twitter等出现在评论框上方和每个评论下方的共享链接 这里截图 有没有办法通过在CSS中隐藏共享元素来实现这一点 我知道新的discus使用了一个iframe,但是有一个类似的线程用于隐藏discus的页脚,下面的CSS代码确实有效 #disqus_thread{ position: relative; } #disqus_thread:aft
#disqus_thread{
position: relative;
}
#disqus_thread:after{
content: "";
display: block;
height: 55px;
width: 100%;
position: absolute;
bottom: 0px;
background:white;
}
使用Chrome中的“inspect元素”,我可以使用“display:none”隐藏共享元素
.nav-secondary>ul>li.share-menu {
float: right;
display: none;
}
及
有没有人能帮助我使用正确的代码/语法将其添加到my styles.css以隐藏社交共享按钮
谢谢 如本文所述,这是不可能的。 原因:它使用iframe来呈现注释以防止 尽管我不建议你这么做,但有一种方法可以做到 在做这些之前,请先阅读
<div id="disqus_thread"><div>
<style>
.hide-social-discuss {
background: white; // change color according to your site back.
height: 20px;
position: relative;
width: 80%;
top: -60px;
}
<script>
//add this to script
$("#disqus_thread").append("<div class='hide-social-discuss'></div>")
</script>
与您提到的CSS相同,但已调整为包含共享按钮 在使用本产品之前,请先阅读本产品的条款和条件
disqus_thread {
position: relative;
}
#disqus_thread:before {
content: "";
display: block;
height: 20px;
width: 80%;
position: relative;
bottom: -72px;
background: white; //replace with your background colour
}
你将不能再使用特色评论了,但是,嘿,它是有效的
“”_ツ_/“你不能。discus小部件加载在iframe中,使CSS无法访问它。文档还声明这些元素无法删除:您链接到的关于隐藏页脚的线程只是从您自己的页面中将一个元素放置在iframe顶部。感谢您的及时回复。可以在共享按钮上放置类似的元素吗?嗨,克鲁,欢迎!请考虑增加更多信息。这和前面提到的隐藏Disqs页脚的CSS操作相同,只是调整了以覆盖共享按钮。
disqus_thread {
position: relative;
}
#disqus_thread:before {
content: "";
display: block;
height: 20px;
width: 80%;
position: relative;
bottom: -72px;
background: white; //replace with your background colour
}