CSS 无法识别 class 并更改 header 中的内容
CSS not recognizing class and changing content within the header
Product display that I am trying to manipulate in CSS using ul, ol .row
Megamenu <ol>
内容随着我的 <ul>
cms 标签而变化 2
ul,
ol .col-3 {
margin-top: 0rem;
margin-bottom: 1rem;
font-size: medium;
}
.col-3 {
text-align: left;
width: 100%;
position: relative;
vertical-align: -webkit-baseline-middle;
max-width: 100%;
display: inline-block;
padding-bottom: 4rem;
}
.col-12 {
text-align: left;
width: 100%;
position: relative;
vertical-align: -webkit-baseline-middle;
max-width: 100%;
display: inline-block;
}
.button {
transition: all .3s;
margin: 5px;
text-decoration: none;
display: inline-block;
background: white;
height: 50%;
width: 100%;
line-height: 25px;
text-align: center;
color: black;
margin: auto;
}
.button:hover {
box-shadow: 40px;
border: solid;
}
h3 {
margin-top: 0rem;
margin-bottom: 2rem;
position: relative;
max-width: 100%;
margin-bottom: 2rem;
font-weight: bold;
padding-left: 1.5rem;
}
<div class="row">
<div class="col-3">
<div class="col-12">
<h3 class="size-25"><a href="{{config path=" web/secure/base_url "}}/brands/shepherd-casters/casters/razer-series.html"><span style="color: #007dbd;">Razer</span></a></h3>
<div class="col-content" style="text-align: center; padding-top: 3%; padding-bottom: 3%;">
<a href="https://df239c5e7e.nxcli.net/brands/shepherd-casters/casters/razer-series.html"><img src="https://casterdepot.com/media/Shepherd/RZ03TPP090SWTP05.png" alt="" width="200px;" height="250px;"></a>
</div>
</div>
<div class="col-12">
<div class="col-content" style="text-align: left; padding-top: 3%; padding-bottom: 3%;">
<ul>
<li>Dynamic Capacity</li>
<li>Bearing / Raceways</li>
<li>Finish</li>
</ul>
<a href="https://df239c5e7e.nxcli.net/brands/shepherd-casters/casters/razer-series.html">
<button class="button 3" type="button">Read More</button>
</a>
</div>
</div>
</div>
</div>
我希望 ul
、ol
CSS 只响应 body 内容而不是 header
中的内容。它正在扩大 header 中的内容,因为它使用了 <ol>
标签。此网站 运行 关闭 Magento 2.4.
尝试在定义的 ul/ol CSS
之前添加正文 class
示例:
BODY_CLASS ul, BODY_CLASS ol .col-3 {
margin-top: 0rem;
margin-bottom: 1rem;
font-size: medium;
}
如果 <body>
标签没有 class 那么您可以使用 body
代替 BODY_CLASS
我明白了。结果 header 使用了基本的 ul
、ol
样式,所以我将 class 名称更改为 .bullet-info
。 header 否决了我的样式,所以我不得不给项目符号自定义 class。
.bullet-info {
margin-top: 0rem;
margin-bottom: 1rem;
font-size: medium;
text-align: left;
}
.product-display .col-content {
-webkit-box-shadow: 1px 2px 6px -1px rgb(0 0 0 / 20%);
-moz-box-shadow: 1px 2px 6px -1px rgba(0, 0, 0, 0.2);
-ms-box-shadow: 1px 2px 6px -1px rgba(0, 0, 0, 0.2);
box-shadow: 1px 2px 6px -1px rgb(0 0 0 / 50%);
padding: 0 1rem 1.5rem;
margin: 0 .5rem .5rem;
text-align: center;
padding-top: 3%;
padding-bottom: 3%;
}
.product-display .row {
max-width: 1360px;
margin: auto;
margin-top: 4rem;
}
.series-text {
margin-top: .5rem;
margin-bottom: .5rem;
position: relative;
max-width: 100%;
text-align: left;
}
.product-name {
margin-top: 0rem;
margin-bottom: 2rem;
position: relative;
max-width: 100%;
margin-bottom: 2rem;
font-weight: bold;
padding-left: 1.5rem;
}
@media only screen and (max-width: 991px) {
.series-text {
margin-top: .5rem;
margin-bottom: .5rem;
position: relative;
max-width: 100%;
font-size: 1.5rem;
}
}
@media only screen and (max-width: 991px) {
.product-name {
font-size: 2.4rem;
}
}
<div class="col-content">
<ul class="bullet-info">
<li>Dynamic Capacity</li>
<li>Bearing / Raceways</li>
<li>Finish</li>
</ul>
<a href="https://df239c5e7e.nxcli.net/brands/shepherd-casters/casters/razer-series.html">
<button class="cd-button" type="button">Read More</button>
</a>
</div>
Product display that I am trying to manipulate in CSS using ul, ol .row
Megamenu <ol>
内容随着我的 <ul>
cms 标签而变化 2
ul,
ol .col-3 {
margin-top: 0rem;
margin-bottom: 1rem;
font-size: medium;
}
.col-3 {
text-align: left;
width: 100%;
position: relative;
vertical-align: -webkit-baseline-middle;
max-width: 100%;
display: inline-block;
padding-bottom: 4rem;
}
.col-12 {
text-align: left;
width: 100%;
position: relative;
vertical-align: -webkit-baseline-middle;
max-width: 100%;
display: inline-block;
}
.button {
transition: all .3s;
margin: 5px;
text-decoration: none;
display: inline-block;
background: white;
height: 50%;
width: 100%;
line-height: 25px;
text-align: center;
color: black;
margin: auto;
}
.button:hover {
box-shadow: 40px;
border: solid;
}
h3 {
margin-top: 0rem;
margin-bottom: 2rem;
position: relative;
max-width: 100%;
margin-bottom: 2rem;
font-weight: bold;
padding-left: 1.5rem;
}
<div class="row">
<div class="col-3">
<div class="col-12">
<h3 class="size-25"><a href="{{config path=" web/secure/base_url "}}/brands/shepherd-casters/casters/razer-series.html"><span style="color: #007dbd;">Razer</span></a></h3>
<div class="col-content" style="text-align: center; padding-top: 3%; padding-bottom: 3%;">
<a href="https://df239c5e7e.nxcli.net/brands/shepherd-casters/casters/razer-series.html"><img src="https://casterdepot.com/media/Shepherd/RZ03TPP090SWTP05.png" alt="" width="200px;" height="250px;"></a>
</div>
</div>
<div class="col-12">
<div class="col-content" style="text-align: left; padding-top: 3%; padding-bottom: 3%;">
<ul>
<li>Dynamic Capacity</li>
<li>Bearing / Raceways</li>
<li>Finish</li>
</ul>
<a href="https://df239c5e7e.nxcli.net/brands/shepherd-casters/casters/razer-series.html">
<button class="button 3" type="button">Read More</button>
</a>
</div>
</div>
</div>
</div>
我希望 ul
、ol
CSS 只响应 body 内容而不是 header
中的内容。它正在扩大 header 中的内容,因为它使用了 <ol>
标签。此网站 运行 关闭 Magento 2.4.
尝试在定义的 ul/ol CSS
之前添加正文 class示例:
BODY_CLASS ul, BODY_CLASS ol .col-3 {
margin-top: 0rem;
margin-bottom: 1rem;
font-size: medium;
}
如果 <body>
标签没有 class 那么您可以使用 body
代替 BODY_CLASS
我明白了。结果 header 使用了基本的 ul
、ol
样式,所以我将 class 名称更改为 .bullet-info
。 header 否决了我的样式,所以我不得不给项目符号自定义 class。
.bullet-info {
margin-top: 0rem;
margin-bottom: 1rem;
font-size: medium;
text-align: left;
}
.product-display .col-content {
-webkit-box-shadow: 1px 2px 6px -1px rgb(0 0 0 / 20%);
-moz-box-shadow: 1px 2px 6px -1px rgba(0, 0, 0, 0.2);
-ms-box-shadow: 1px 2px 6px -1px rgba(0, 0, 0, 0.2);
box-shadow: 1px 2px 6px -1px rgb(0 0 0 / 50%);
padding: 0 1rem 1.5rem;
margin: 0 .5rem .5rem;
text-align: center;
padding-top: 3%;
padding-bottom: 3%;
}
.product-display .row {
max-width: 1360px;
margin: auto;
margin-top: 4rem;
}
.series-text {
margin-top: .5rem;
margin-bottom: .5rem;
position: relative;
max-width: 100%;
text-align: left;
}
.product-name {
margin-top: 0rem;
margin-bottom: 2rem;
position: relative;
max-width: 100%;
margin-bottom: 2rem;
font-weight: bold;
padding-left: 1.5rem;
}
@media only screen and (max-width: 991px) {
.series-text {
margin-top: .5rem;
margin-bottom: .5rem;
position: relative;
max-width: 100%;
font-size: 1.5rem;
}
}
@media only screen and (max-width: 991px) {
.product-name {
font-size: 2.4rem;
}
}
<div class="col-content">
<ul class="bullet-info">
<li>Dynamic Capacity</li>
<li>Bearing / Raceways</li>
<li>Finish</li>
</ul>
<a href="https://df239c5e7e.nxcli.net/brands/shepherd-casters/casters/razer-series.html">
<button class="cd-button" type="button">Read More</button>
</a>
</div>