[英]How do I show GitBook title?
In GitBook, the title shows up while mousing over them by default.在 GitBook 中,默认情况下将鼠标悬停在标题上时会显示标题。
I wanna show up the title.我想显示标题。 I inspect the elements,
我检查元素,
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href=".." >Preface</a>
</h1>
</div>
and related CSS is,和相关的 CSS 是,
.book-header h1 a, .book-header h1 a:hover {
color: inherit;
text-decoration: none;
}
I add the following CSS,我添加以下CSS,
.book-header h1 a {
display: block !important;
}
but it doesn't work.但它不起作用。
Update:更新:
I follow the answer from @ED Wu, and add the following code to CSS,我按照@ED Wu的回答,将以下代码添加到CSS,
.book-header h1 {
opacity: 1;
}
The title does show up.标题确实出现了。 However, the left sidebar doesn't show up while I click on
三
(no action) after adding opacity:1
.但是,在添加
opacity:1
后单击三
(无操作)时,左侧边栏没有显示。 An example is here .一个例子在这里。
Because.book-header h1 opacity is 0.因为.book-header h1 opacity为0。
Try add this to your css.尝试将此添加到您的 css。
.book-header h1 {
opacity:1!important;
}
Try this!尝试这个! More about
color: inherit
here .有关
color: inherit
在这里继承。 You can use other property like z-index
, opacity
and position
if it doesn't work too.如果它也不起作用,您可以使用其他属性,如
z-index
、 opacity
和position
。 Thanks:)谢谢:)
.book-header h1 a, .book-header h1 a:hover { display: block;important: color; #000:important; text-decoration: none; }
<div class="book-header" role="navigation"> <.-- Title --> <h1> <i class="fa fa-circle-o-notch fa-spin"></i> <a href=".." >Preface</a> </h1> </div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.