首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在/div主题主页中隐藏#文本

在/div主题主页中隐藏#文本
EN

Stack Overflow用户
提问于 2020-11-10 18:13:26
回答 1查看 92关注 0票数 0

我们使用WordPress运行一个站点,并使用模板进行设计。

在我们的主页上,我们有我们的博客文章的卷轴,其中包括标题,作者/帖子信息,阅读时间和“摘录”?

我们在努力摆脱“节选”

blog-post-content-list-sider是div,文本只是其中的一个#文本。

我查到的每一件事都有点像.blog-post-content-list-sider { display: none; },但这会掩盖整个事情,而不仅仅是它的一个方面(如果我正确理解的话)

这是1 blog-post-content-list-sider的代码

以“前沿”开头的部分是我需要从页面上的每一篇文章中删除的文本。

代码语言:javascript
复制
<div class="blog-post-content-list-sider">              
<div class="textalignleft subtitle_post_standard">
<a href="https://www.aimblog.io/category/artificial-intelligence/" title="View all posts in Artificial Intelligence">Artificial Intelligence</a>&nbsp;<a href="https://www.aimblog.io/category/emerging-technology/" title="View all posts in Emerging Technology">Emerging Technology</a>&nbsp;<a href="https://www.aimblog.io/category/medicine/" title="View all posts in Medicine">Medicine</a></div>       <h3 class="title_post_standard">            <a href="https://www.aimblog.io/2020/08/30/ai-the-key-to-fertility-treatment/">AI: The Key to Fertility Treatment?</a>      </h3>
<div class="fancy_one ig_meta_post_classic textaligncenter">    
<span><div class="indie_author">By <b> <div class="vcard author">
<a href="https://www.aimblog.io/author/sohail-merchant/" title="Posts by Sohail Merchant" rel="author">Sohail Merchant</a></div> </b> 
</div><div class="indie_on">on </div><div class="updated indie_date">   <b> August 30, 2020</b>     </div>  </span></div>
<span class="rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time">4</span> <span class="rt-label rt-postfix">minutes</span></span>
 A Cutting-Edge Discussion about AI’s Eminent Role in Reproduction Intro Artificial intelligence has been widely useful in the diagnosis and treatment of diseases. However, little has been discovered about its capabilities in the realm of fertility treatment. Well, all that is about to change because we will soon experience the first application of AI in […]            
 </div>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-11-10 19:51:57

编辑:

我测试了这个CSS代码,它可以工作。Codepen链接请试一试

代码语言:javascript
复制
.blog-post-content-list-sider{
  visibility:hidden;
}

.blog-post-content-list-sider>*{
  visibility:visible;
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64774497

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档