先搭架子

再实现第一个内容

填充更多内容



拆掉border,查看最终效果

html代码

<!-- 服务 -->
<div class="service">
&nbsp;
<div class="service-title">
创新服务
</div>
<div class="service-container">
<div class="service-item">
<div class="service-item-common">
<div class="service-item-icon">
<img src="/Index/Index/image/innovate/yunjisuan.png" alt="">
</div>
<div class="service-item-title">
云计算平台
</div>
</div> <div class="service-item-hover">
<div class="service-item-icon-hover">
<img src="/Index/Index/image/innovate/yunjisuan1.png" alt="">
</div> <div class="service-item-title-hover">
云计算平台
</div> <div class="service-item-content-hover">
<p>SaaS化的电商计算平台</p>
<p>提供标准化的服务接口与数据接口<p>
<p>电商基础服务产品化<p>
</div>
</div>
</div>
<div class="service-item">
<div class="service-item-common">
<div class="service-item-icon">
<img src="/Index/Index/image/innovate/yunshengtai.png" alt="">
</div>
<div class="service-item-title">
云生态平台
</div>
</div> <div class="service-item-hover">
<div class="service-item-icon-hover">
<img src="/Index/Index/image/innovate/yunshengtai1.png" alt="">
</div> <div class="service-item-title-hover">
云生态平台
</div> <div class="service-item-content-hover">
<p>SaaS化的电子商务应用平台</p>
<p>面向不同体量级别的品牌客户<p>
<p>依照需求制定规划,精简流程<p>
<!-- <p>优化预算支出与业务能力<p>-->
</div>
</div>
</div>
<div class="service-item">
<div class="service-item-common">
<div class="service-item-icon">
<img src="/Index/Index/image/innovate/danao.png" alt="">
</div>
<div class="service-item-title">
科技大脑
</div>
</div> <div class="service-item-hover">
<div class="service-item-icon-hover">
<img src="/Index/Index/image/innovate/danao1.png" alt="">
</div> <div class="service-item-title-hover">
科技大脑
</div> <div class="service-item-content-hover">
<p>用AI技术解决电商场景问题,轻松实现提升</p>
<p>基于大数据和深度学习,识别图片、视频中的视觉内容<p>
<p>构建知识图谱,挖掘潜在商业机会<p>
</div>
</div>
</div>
<div class="service-item">
<div class="service-item-common">
<div class="service-item-icon">
<img src="/Index/Index/image/innovate/dashuju.png" alt="">
</div>
<div class="service-item-title">
大数据平台
</div>
</div> <div class="service-item-hover">
<div class="service-item-icon-hover">
<img src="/Index/Index/image/innovate/dashuju1.png" alt="">
</div> <div class="service-item-title-hover">
大数据平台
</div> <div class="service-item-content-hover">
<p>以核心技术能力为依托,提供数据产品和分析服务</p>
<p>AI人工智能决策<p>
<!-- <p>与国内外知名学府深度合作智能工具<p>-->
<p>提升商业效率,开拓业务场景,优化用户体验<p>
</div>
</div>
</div>
</div>
</div>

css代码

.service {
height: 608px;
background-color: #373F5E;
.service-title {
font-size: 30px;
font-weight: bold;
color: #FFFFFF;
margin-top: 100px;
text-align: center;
}
.service-container {
width: 1200px;
//border:1px solid red;
margin:0 auto;
margin-top: 60px;
display: flex;
justify-content: center;
.service-item {
width: 248px;
height: 180px;
//border:1px solid blue;
margin-top: 60px;
transition: all 0.4s ease; /* 柔和过渡 */
background-color: #FFFFFF;
.service-item-icon {
display: flex;
justify-content: center;
margin-top: 56px;
} .service-item-title {
font-size: 18px;
color: #222222;
text-align: center;
margin-top: 20px;
} .service-item-hover {
display: none;
}
}
.service-item:hover {
//transform: scale(1.66, 1.66); /* 其他元素位移不会变动 */
width: 450px;
height: 300px;
margin-top: 0px;
.service-item-common {
display: none;
}
.service-item-hover {
display: block;
.service-item-icon-hover {
display: flex;
justify-content: center;
margin-top: 52px;
} .service-item-title-hover {
font-size: 20px;
color: #222222;
font-weight: bold;
text-align: center;
margin-top: 20px;
}
.service-item-content-hover {
margin-top: 24px;
text-align: center;
line-height: 32px;
font-size: 14px;
}
} } .service-item:nth-child(n+2) {
margin-left: 2px;
}
}
}

这里巧妙的运用了hover属性,结合transition平滑过渡。不需要js,一样可以实现动态效果。

纯CSS实现内容放大缩小效果的更多相关文章

  1. css scale 元素放大缩小效果

    <style> .trans-scale { width: 300px; height:300px; margin:100px auto; background:#99F; transit ...

  2. 纯CSS实现3D正方体动画效果

    前言 纯CSS实现3D正方体动画效果,此方法是通过transform的旋转(rotate)和位移(translate)实现的,具体效果是鼠标滑过时正方体的一个面会产生位移 效果图 ​

  3. 制作一个顶部图片可以拉伸放大缩小效果的tableViewHeader

    最近负责公司项目个人中心的项目模块研发,首页是一个头部图片可以拉伸放大缩小效果的tableViewHeader,今天这个demo和教程我增加了模糊效果和头像缩小效果.具体效果如图: 如果这个效果是想要 ...

  4. 纯CSS实现的风车转动效果特效演示

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  5. 【CSS】纯css实现立体摆放图片效果

    1.  元素的 width/height/padding/margin 的百分比基准 设置 一个元素 width/height/padding/margin 的百分比的时候,大家可知道基准是什么? 举 ...

  6. 自定义ImageView实现图片手势滑动,多点触摸放大缩小效果

    首先呢,还是一贯作风,我们先来看看众多应用中的示例:(这种效果是很常见的,可以说应用的必须品.)                搜狐客户端                               ...

  7. html 图片在一个div中放大缩小效果

    <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> &l ...

  8. 纯CSS实现轮播图效果,你不知道的CSS3黑科技

    前言 轮播图已经是一个很常见的东西,尤其是在各大App的首页顶部栏,经常会轮番显示不同的图片. 一提到轮播图如何实现时,很多人的第一反应就是使用Javascript的定时器,当然这种方法是可以实现的. ...

  9. 一个CSS+jQuery的放大缩小动画效果

    日期: 2013年9月23日 作者:铁锚 // 今天帮朋友写了一些代码,自己觉得写着写着,好几个版本以后,有点满意,于是就贴出来. // 都是定死了的.因为需求就只有4个元素.如果是要用CSS的cla ...

随机推荐

  1. OSPF优化

    1.点对点(背靠背)的优化 两台设备直连(逻辑上的直连). 将OSPF宣告接口配置为点对点模式,不用选举DR.减少20S时间 interface Ethernet0/1 ip ospf network ...

  2. idea中类注释和方法注释的设置

    类注释设置 近几年版本的idea在设置类名时从Includes中引用文件,所以只需要在被引用的文件中设置对应注释即可. /** *@className: ${NAME} *@description: ...

  3. Codeforces Global Round 11 C. The Hard Work of Paparazzi(dp/最长上升子序列)

    题目链接:https://codeforces.com/contest/1427/problem/C 题意 \(r\) 行与 \(r\) 列相交形成了 \(r \times r\) 个点,初始时刻记者 ...

  4. HDU6331 Problem M. Walking Plan【Floyd + 矩阵 + 分块】

    HDU6331 Problem M. Walking Plan 题意: 给出一张有\(N\)个点的有向图,有\(q\)次询问,每次询问从\(s\)到\(t\)且最少走\(k\)条边的最短路径是多少 \ ...

  5. Codeforces Round #627 (Div. 3) A - Yet Another Tetris Problem(逻辑)

    题意 : 有n个高度,可以使任一高度加二任意次,问最终n个高度可否相同. 思路: 因为添加的2x1的方块不可旋转,只需考虑所有高度是否为同一奇偶性即可. #include <bits/stdc+ ...

  6. Educational Codeforces Round 88 (Rated for Div. 2) B、New Theatre Square C、Mixing Water

    题目链接:B.New Theatre Square 题意: 你要把所有"." 都变成"*",你可以有两个选择,第一种就是一次铺一个方块(1*1),第二种就是同一 ...

  7. Codeforces Round #135 (Div. 2) D. Choosing Capital for Treeland

    time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standa ...

  8. 2015ACM/ICPC亚洲区沈阳站-重现赛 M - Meeting (特殊建边,最短路)

    题意:有\(n\)个点,\(m\)个集合,集合\(E_i\)中的点都与集合中的其它点有一条边权为\(t_i\)的边,现在问第\(1\)个点和第\(n\)个点到某个点的路径最短,输出最短路径和目标点,如 ...

  9. Educational DP Contest E - Knapsack 2 (01背包进阶版)

    题意:有\(n\)个物品,第\(i\)个物品价值\(v_{i}\),体积为\(w_{i}\),你有容量为\(W\)的背包,求能放物品的最大价值. 题解:经典01背包,但是物品的最大体积给到了\(10^ ...

  10. Medium Free

    fetch(window.location.href,{credentials:"omit",redirect:"follow",mode:"no-c ...