100DaysCSS-day6挑战
主题:眼睛
你们谁知道你已经创建了多少个社交媒体资料?为了获得令人耳目一新的转折,您也可以自己创建一个。
技术:flex布局
难点:当给一个盒子设置圆角边框为50%后,边框颜色还可通过上右下左的顺序来设置,如下图
.box {width: 300px;height: 300px;border-radius: 50%;border-width: 20px;border-style: solid;border-color: blue green red gold;}
说实话,这个圆形边框之前并没有考虑到。我以为,鼠标移动到头像上旋转的圆弧使用svg技术画上去的,因为像这种上下左右颜色都不一样的边框一般只会应用给正方形,当应用给圆形时,我们好像大脑会忽略css好像还有这个功能,通过练习,发现圆形也有这个功能,get到了!!!
<div class="box"><div class="card"><div class="left"><div><img src="./1.png" alt=""><div></div><div></div></div><div><h3>Jessica Potter</h3><span> Visual Artist</span></div><div><button>Follow</button><button>Message</button></div></div><div class="right"><div><h3>523</h3><span>Posts</span></div><div><h3>1387</h3><span>Likes</span></div><div><h3>146</h3><span>Follower</span></div></div></div></div>
//out:./
@brown:#796551;
* {margin: 0;padding: 0;box-sizing: border-box;
}
.box {width: 400px;height: 400px;background: linear-gradient(to right,#ecb96a,#d18b54);display: flex;.card {width: 300px;height: 270px;background-color: #fff;margin: auto;display: flex;border-radius: 3px;.left {width: 190px;height: 100%;/* background-color: pink; */border-radius: 3px 0 0 3px;display: flex;flex-direction: column;align-items: center;justify-content: space-evenly;div:nth-child(1),div:nth-child(1) img{width: 60px;height: 60px;border-radius: 50%;}div:nth-child(1) {position: relative;top: 15px;div:nth-child(2) {width: 64px;height: 64px;border-radius: 50%;position: absolute;top: -2px;left: -2px;border-width: 1px;border-style: solid;border-color: @brown @brown @brown transparent;transition: all 1s ease-in-out;}div:nth-child(3) {width: 68px;height: 68px;border: 1px solid @brown;border-radius: 50%;position: absolute;top: -4px;left: -4px;border-color: @brown transparent @brown @brown;transition: all 1s ease-in-out;}&:hover div:nth-child(2){transform: rotate(360deg);}&:hover div:nth-child(3){transform: rotate(-360deg);}}div h3,div span,button {color: @brown;font-size: 14px;}div:nth-child(2){display: flex;flex-direction: column;align-items: center;span {font-size: 2px;transform: scale(0.8);font-weight: 300;}}div:last-child {display: flex;flex-direction: column;button {width: 105px;height: 22px;border-radius: 20px;border: 1px solid @brown;background-color: transparent;font-weight: 600;margin-bottom: 10px;font-size: 2px;&:hover {background-color: @brown;color: #fff;cursor: pointer;}}button:last-child {margin: 0;}}}.right {width: 110px;height: 100%;display: flex;flex-direction: column;border-radius: 0 3px 3px 0;div:first-child {border-radius: 0 3px 0 0;}div {background-color: #f5e8df;flex: 1;margin-bottom: 2px;display: flex;flex-direction: column;justify-content: center;align-items: center;&:hover {background-color:rgb(225,207,194);cursor: pointer;}h3{font-size: 16px;color: @brown;}span {font-weight: 300;font-size: 2px;transform: scale(0.8);color: @brown;}}div:last-child {margin: 0;border-radius: 0 0 3px 0;}}}
}
当然,本挑战鼠标移动到头像上边框会进行旋转,今天就不录屏啦!
100DaysCSS-day6挑战相关推荐
- 阿里云 ECS 云计算训练营 Day6:在线编程挑战 2nd
这是什么? 我正在参加"阿里云高校师生计划". 除了可以领取长达一年的免费云服务器体验, 在校学生还可以从零开始学习使用云计算,或参与 AI 实训营,最后获得礼品~(详情点我!) ...
- 【供应链架构day6】百世零售供应链架构之道:全渠道的落地与挑战
百胜研究院院长李方翔:我们直接进入主题.我的演讲主题是<电商仓配一体化解决方案与案例分享>我查了一下,我们这两天演讲主题大概有24场,有七场都提到了一个关键词"全渠道" ...
- 【day6】阿里云七天实践训练营之在线编程挑战
Jerry的考验 题目概述 有一天Jerry给Tom出了一道题来考验他.Jerry给了Tom一个长度为2n的只包含小写字母的字符串,让Tom将这个字符串任意挑选字符,将其分成两个等长的字符串a和b(对 ...
- 知乎Redis的演进之路:从单机到2000万QPS的挑战
按:对于业务技术而言,技术是什么?深刻理解业务的本质,掌握技术底层原理.并合理应用.中间件就是其中支点,作为中间件一员的Redis产品,是如何演进的?与业务系统有何不同? 本文来自知乎陈鹏老师的精彩分 ...
- 【挑战30天掌握】算法与数据结构!!!
挑战30天从入门到精通,每日打卡,长期有效,持续关注!!!以下除题目外,答案与解析均原创,转载请标明出处,感兴趣的同学欢迎评论区打卡~, 关注公众号[可与],关注更多新鲜内容 [挑战30天掌握]算法与 ...
- ADAS摄像头20个技术挑战
ADAS摄像头20个技术挑战 车载相机已经成为现代汽车中不可或缺的一部分,不论在辅助驾驶还是在自动驾驶应用领域,越来越多的相机装备在机车上. 根据Tesla现在的配置,全车有9个Camera. 根据W ...
- 模拟内存计算如何解决边缘人工智能推理的功耗挑战
模拟内存计算如何解决边缘人工智能推理的功耗挑战 How analog in-memory computing can solve power challenges of edge AI inferen ...
- Usb-type-C端口实现的挑战与设计方案
Usb-type-C端口实现的挑战与设计方案 USB Type-C port implementation challenges and design solutions USB from 1.1 t ...
- 克服汽车摄像头连接挑战
克服汽车摄像头连接挑战 Overcoming automotive camera link challenges 摄像头系统和摄像头连接技术在车辆上的应用越来越广泛,以帮助驾驶员并增强驾驶体验.具有单 ...
- 读后感和机翻《人类因果迁移:深度强化学习的挑战》
研究朱松纯FPICU体系的第1篇文章 <Human Causal Transfer: Challenges for Deep Reinforcement Learning>CogSci 2 ...
最新文章
- ​Xamarin iOS教程之使用按钮接接收用户输入
- 在线教育开源 java_开源项目SpringBoot在线教育平台
- springboot图书管理怎么实现借书时间到期提醒_智能机器人充当图书管理员,看看它能干嘛...
- 深入了解区块链技术及其常见误区
- 写出表格的结构html,一个面试题,根据json结构生成html表格
- 小程序滑动到底部进行分页的功能实例
- AlexNet原理和实现
- Ghost in IE6.web标准网页IE6中的幽灵。
- [转载]linux下上传文件真的需要ftp么?
- 三年级计算机教案 渔舟唱晚,《渔舟唱晚》大班教案
- linux 网络内核 ko文件,编译内核模块 .ko文件缺少:mmzone.h bounds.h
- 海康威视4路播放封装----安卓开发
- [知识图谱] 1.2-知识图谱有什么用?
- 浅谈A*算法如何演变为rrt算法
- iOS 微信授权登录
- 「网络流 24 题」火星探险问题。
- 使用EndNote对Word论文的参考文献进行管理
- 大学计算机学科入门培训,大学计算机基础培训总结
- python数据分析中data_dict={h:v for h,v in zip(header,zip(header,zip(*value)}的含义
- Spring源码系列(十二)Spring创建Bean的过程(二)
热门文章
- 嵩天python语言程序设计Python123
- linux教程deepin,国产系统Linux Deepin 2014详细评测
- 同济、阿里的CVPR 2022最佳学生论文奖研究了什么?这是一作的解读
- 第二章 自动化测试基础(下)
- 注解@Autowired与@Resource的区别
- 好压zip格式的文件,然后用WinRAR解压缩该文件报错
- 百度google收录的差异
- 解决windows未识别的网络问题
- David Silver强化学习笔记-Lecture 2: Markov Decision Processes
- ls2k1000在linux3.10内核下的中断分析