Home > Web Front-end > CSS Tutorial > css to achieve card-style picture effect

css to achieve card-style picture effect

王林
Release: 2020-09-01 16:26:03
forward
7347 people have browsed it

css to achieve card-style picture effect

First let’s take a look at the renderings:

(Recommended tutorial: CSS tutorial)

css to achieve card-style picture effect

html code:

<div class="card">
    <img  src="/static/img/03_pingtai/03_02.jpg" alt=""/>
    <div>
        <span>打破企业间壁垒,提供便捷的接入方式,实现不企业,不同品牌、不同类型间的家电的数据互联互通和数据协同</span>
    </div>
</div>
Copy after login

css code:

.card img {
    width: 100%;
}
.card{
    height: 270px;
    width: 260px;
    background-color: white;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    border-radius: 4px;
    display: inline-block;
    margin-left: 18px;
    vertical-align: top;
}
.card span {
    font-size: 12px;
    color: #BFBFBF;
    display: block;
    letter-spacing: 2px;
    padding: 30px 20px;
}
Copy after login

The above is the detailed content of css to achieve card-style picture effect. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template