gpt4 book ai didi

css - 字幕样式更改

转载 作者:行者123 更新时间:2023-11-28 00:59:15 24 4
gpt4 key购买 nike

嗨 Stack Overflow 社区,

新手 HTML 用户:我目前正在为我的画廊网站使用 Baguette 画廊 (v1.8.1) 代码。教程:http://yifangdi.blogspot.com/2017/05/baguetteboxjs-simple-and-easy-to-use.html

我想改变“data-caption”的字体样式示例代码:或实现悬停标题 .css 样式规则。

图库网格的 CSS:

body {
background - image: linear - gradient(to top, #d3c081 % , #d3c081 75 % , #d3c081 100 % );
min - height: 100 vh;
font: normal 16 px sans - serif;
padding: 100 px 0;
}

.container.gallery - container {
background - color: #163049;
color: # 163049;
min - height: 100 vh;
border - radius: 20 px;
box - shadow: 0 8 px 15 px rgba(0, 0, 0, 0.06);
}

.gallery - container h1 {
text - align: center;
margin - top: 70 px;
font - family: 'Droid Sans', sans - serif;
font - weight: bold;
}

.gallery - container p.page - description {
text - align: center;
max - width: 800 px;
margin: 25 px auto;
color: #888;
font-size: 18px;
}

.tz-gallery {
padding: 40px;
}

.tz-gallery .lightbox img {
width: 100%;
margin-bottom: 30px;
transition: 0.2s ease-in-out;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

.tz-gallery .lightbox img:hover {
transform: scale(1.05);
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.tz-gallery img {
border-radius: 4px;
}

.baguetteBox-button {
background-color: transparent !important;
}

@media(max-width: 768px) {
body {
padding: 100px 0;
}
.container.gallery-container {
border-radius: 0;
}
}
<div class="container gallery-container">
<div class="tz-gallery">

<div class="row">
<div class="col-sm-6 col-md-4">
<a class="lightbox" href="images/park.jpg" data-caption="The Park">
<img src="images/park.jpg" alt="Park">
</a>
</div>

</div>
</div>
</div>

最佳答案

body {
background-image: linear-gradient(to top, #d3c081%, #d3c081 75%, #d3c081 100%);
min-height: 100vh;
font: normal 16px sans-serif;
padding: 100px 0;
}

.container.gallery-container {
background-color: #163049;
color: #163049;
min-height: 100vh;
border-radius: 20px;
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.06);
}

.gallery-container h1 {
text-align: center;
margin-top: 70px;
font-family: 'Droid Sans', sans-serif;
font-weight: bold;
}

.gallery-container p.page-description {
text-align: center;
max-width: 800px;
margin: 25px auto;
color: #888;
font-size: 18px;
}

.tz-gallery {
padding: 40px;
}

.tz-gallery .lightbox img {
width: 100%;
margin-bottom: 30px;
transition: 0.2s ease-in-out;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

.tz-gallery .lightbox img:hover {
transform: scale(1.05);
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.tz-gallery img {
border-radius: 4px;
}

.baguetteBox-button {
background-color: transparent !important;
}

@media(max-width: 768px) {
body {
padding: 100px 0;
}
.container.gallery-container {
border-radius: 0;
}
}

[data-caption="The Park"] {
font: italic 16px sans-serif;
font-size: 2em;
}
<div class="container gallery-container">
<div class="tz-gallery">

<div class="row">
<div class="col-sm-6 col-md-4">
<a class="lightbox" href="images/park.jpg" data-caption="The Park">
<img src="images/park.jpg" alt="Park">
</a>
</div>

</div>
</div>
</div>

像下面这样使用[data-caption]

[data-caption="The Park"] { 
font: italic 16px sans-serif;
font-size: 2em;
}

关于css - 字幕样式更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52772057/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com