gpt4 book ai didi

html - 为一个重复出现的元素分配一个盒子阴影

转载 作者:行者123 更新时间:2023-11-28 08:27:54 27 4
gpt4 key购买 nike

我的CCS代码是

.isotope {
box-shadow: 0px 8px 15px;
}

我也试过

#content .isotope {
box-shadow: 0px 8px 15px;
}

.portfolio-wrapper .isotope {
box-shadow: 0px 8px 15px;
}

但这些不显示框阴影。

问题是我只想将此框阴影应用于一个 div。该元素是一个使用短代码的投资组合,位于几页上。我只想要位于主页上的投资组合上的框阴影。我正在努力将它准确地应用到我想去的地方,它无处不在!

我对 HTML 不是很好,发布它可能很荒谬我真的不知道,但万一它可以帮助你帮助我......

<div id="content" class="portfolio-four">
<div class="portfolio-wrapper isotope" style="position: relative; overflow: hidden; height: 232px;">
<div class="portfolio-item isotope-item" style="position: absolute; left: 0px; top: 0px; transform: translate3d(0px, 0px, 0px);">
<div class="project-feed clearfix">
<div class="ch-item portfolio-4">
<div class="ch-info portfolio-4">
<div class="ch-info-front4 ">
<img src="http://tandc.puerteaspecialists.co.uk/wp-content/uploads/2015/01/aqua-sana-7-220x161.jpg">
</div>
<div class="ch-info-back4 portfolio-4" style="background-image:url(http://tandc.puerteaspecialists.co.uk/wp-content/uploads/2015/01/aqua-sana-7-220x161.jpg);">
<div class="info"><a href="http://tandc.puerteaspecialists.co.uk/?creativo_portfolio=aqua-sana"><i class="icon-search"></i></a>
</div>
</div>
</div>
</div>
</div>
<div class="portfolio_details">
<h3><a href="http://tandc.puerteaspecialists.co.uk/?creativo_portfolio=aqua-sana">Aqua Sana</a></h3>
<div class="tags"><i class="icon-tag"></i>
</div>
</div>
</div>
<div class="portfolio-item clients projects isotope-item" style="position: absolute; left: 0px; top: 0px; transform: translate3d(228px, 0px, 0px);">
<div class="project-feed clearfix">
<div class="ch-item portfolio-4">
<div class="ch-info portfolio-4">
<div class="ch-info-front4 ">
<img src="http://tandc.puerteaspecialists.co.uk/wp-content/uploads/2015/01/photo-1-32-220x161.jpg">
</div>
<div class="ch-info-back4 portfolio-4" style="background-image:url(http://tandc.puerteaspecialists.co.uk/wp-content/uploads/2015/01/photo-1-32-220x161.jpg);">
<div class="info"><a href="http://tandc.puerteaspecialists.co.uk/?creativo_portfolio=center-parcs-2"><i class="icon-search"></i></a>
</div>
</div>
</div>
</div>
</div>
<div class="portfolio_details">
<h3><a href="http://tandc.puerteaspecialists.co.uk/?creativo_portfolio=center-parcs-2">Center Parcs</a></h3>
<div class="tags"><i class="icon-tag"></i><a href="http://tandc.puerteaspecialists.co.uk/?portfolio_category=clients" rel="tag">clients</a>, <a href="http://tandc.puerteaspecialists.co.uk/?portfolio_category=projects" rel="tag">Projects</a>
</div>
</div>
</div>
<div class="portfolio-item bespoke isotope-item" style="position: absolute; left: 0px; top: 0px; transform: translate3d(456px, 0px, 0px);">
<div class="project-feed clearfix">
<div class="ch-item portfolio-4">
<div class="ch-info portfolio-4">
<div class="ch-info-front4 ">
<img src="http://tandc.puerteaspecialists.co.uk/wp-content/uploads/2015/01/51-220x161.jpg">
</div>
<div class="ch-info-back4 portfolio-4" style="background-image:url(http://tandc.puerteaspecialists.co.uk/wp-content/uploads/2015/01/51-220x161.jpg);">
<div class="info"><a href="http://tandc.puerteaspecialists.co.uk/?creativo_portfolio=bespoke"><i class="icon-search"></i></a>
</div>
</div>
</div>
</div>
</div>
<div class="portfolio_details">
<h3><a href="http://tandc.puerteaspecialists.co.uk/?creativo_portfolio=bespoke">Bespoke</a></h3>
<div class="tags"><i class="icon-tag"></i><a href="http://tandc.puerteaspecialists.co.uk/?portfolio_category=bespoke" rel="tag">Bespoke</a>
</div>
</div>
</div>
<div class="portfolio-item isotope-item" style="position: absolute; left: 0px; top: 0px; transform: translate3d(684px, 0px, 0px);">
<div class="project-feed clearfix">
<div class="ch-item portfolio-4">
<div class="ch-info portfolio-4">
<div class="ch-info-front4 ">
<img src="http://tandc.puerteaspecialists.co.uk/wp-content/uploads/2015/01/photo-1-26-220x161.jpg">
</div>
<div class="ch-info-back4 portfolio-4" style="background-image:url(http://tandc.puerteaspecialists.co.uk/wp-content/uploads/2015/01/photo-1-26-220x161.jpg);">
<div class="info"><a href="http://tandc.puerteaspecialists.co.uk/?creativo_portfolio=shop-and-bar-fitting"><i class="icon-search"></i></a>
</div>
</div>
</div>
</div>
</div>
<div class="portfolio_details">
<h3><a href="http://tandc.puerteaspecialists.co.uk/?creativo_portfolio=shop-and-bar-fitting">Shop and Bar Fitting</a></h3>
<div class="tags"><i class="icon-tag"></i>
</div>
</div>
</div>
<div class="portfolio-item bedrooms isotope-item" style="position: absolute; left: 0px; top: 0px; transform: translate3d(912px, 0px, 0px);">
<div class="project-feed clearfix">
<div class="ch-item portfolio-4">
<div class="ch-info portfolio-4">
<div class="ch-info-front4 ">
<img src="http://tandc.puerteaspecialists.co.uk/wp-content/uploads/2015/01/photo-1-15-220x161.jpg">
</div>
<div class="ch-info-back4 portfolio-4" style="background-image:url(http://tandc.puerteaspecialists.co.uk/wp-content/uploads/2015/01/photo-1-15-220x161.jpg);">
<div class="info"><a href="http://tandc.puerteaspecialists.co.uk/?creativo_portfolio=bedrooms"><i class="icon-search"></i></a>
</div>
</div>
</div>
</div>
</div>
<div class="portfolio_details">
<h3><a href="http://tandc.puerteaspecialists.co.uk/?creativo_portfolio=bedrooms">Bedrooms</a></h3>
<div class="tags"><i class="icon-tag"></i><a href="http://tandc.puerteaspecialists.co.uk/?portfolio_category=bedrooms" rel="tag">Bedrooms</a>
</div>
</div>
</div>
</div>
</div>

最佳答案

只需给出 <div>您希望在唯一标识符上放置阴影。

类的目的是提供一个标识符,以便跨多个元素应用样式。 id 的目的是提供一个唯一标识符,以便将样式应用于特定元素。

因此,直接的选择是为 <div> 提供一个唯一的 ID你正在尝试风格。

<div id="front-page" class="portfolio-wrapper isotope"> ....CODE....</div>

然后将以下内容添加到您的 CSS:

#front-page .isotope {
box-shadow: 0px 8px 15px;
}

参见 http://www.w3schools.com/css/css_selectors.asp有关选择器的基本概述。

关于html - 为一个重复出现的元素分配一个盒子阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28457157/

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