【前端设计】card

欢迎来到前端设计专栏,本专栏收藏了一些好看且实用的前端作品,使用简单的html、css语法打造创意有趣的作品,为网站加入更多高级创意的元素。

html

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Title</title><link rel="stylesheet" href="./card1.css"></head>
<body>
<div class="card"><div class="container"><div class="cloud front"><span class="left-front"></span><span class="right-front"></span></div><span class="sun sunshine"></span><span class="sun"></span><div class="cloud back"><span class="left-back"></span><span class="right-back"></span></div></div><div class="card-header"><span>西安 - 雁塔区<br>陕西</span><span>March 13</span></div><span class="temp">23°</span><div class="temp-scale"><span>Celcius</span></div>
</div>
</body>
</html>

css

.card {width: 350px;height: 235px;position: relative;padding: 25px;background: radial-gradient(178.94% 106.41% at 26.42% 106.41%, #FFF7B1 0%, rgba(255, 255, 255, 0) 71.88%) /* warning: gradient uses a rotation that is not supported by CSS and may not behave as expected */, #FFFFFF;box-shadow: 0px 155px 62px rgba(0, 0, 0, 0.01), 0px 87px 52px rgba(0, 0, 0, 0.05), 0px 39px 39px rgba(0, 0, 0, 0.09), 0px 10px 21px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);border-radius: 23px;transition: all 0.8s cubic-bezier(0.15, 0.83, 0.66, 1);cursor: pointer;
}.card:hover {transform: scale(1.05);
}.container {width: 250px;height: 250px;position: absolute;right: -35px;top: -50px;display: flex;align-items: center;justify-content: center;transform: scale(0.7);
}.cloud {width: 250px;
}.front {padding-top: 45px;margin-left: 25px;display: inline;position: absolute;z-index: 11;animation: clouds 8s infinite;animation-timing-function: ease-in-out;
}.back {margin-top: -30px;margin-left: 150px;z-index: 12;animation: clouds 12s infinite;animation-timing-function: ease-in-out;
}.right-front {width: 45px;height: 45px;border-radius: 50% 50% 50% 0%;background-color: #4c9beb;display: inline-block;margin-left: -25px;z-index: 5;
}.left-front {width: 65px;height: 65px;border-radius: 50% 50% 0% 50%;background-color: #4c9beb;display: inline-block;z-index: 5;
}.right-back {width: 50px;height: 50px;border-radius: 50% 50% 50% 0%;background-color: #4c9beb;display: inline-block;margin-left: -20px;z-index: 5;
}.left-back {width: 30px;height: 30px;border-radius: 50% 50% 0% 50%;background-color: #4c9beb;display: inline-block;z-index: 5;
}.sun {width: 120px;height: 120px;background: -webkit-linear-gradient(to right, #fcbb04, #fffc00);background: linear-gradient(to right, #fcbb04, #fffc00);border-radius: 60px;display: inline;position: absolute;
}.sunshine {animation: sunshines 2s infinite;
}@keyframes sunshines {0% {transform: scale(1);opacity: 0.6;}100% {transform: scale(1.4);opacity: 0;}
}@keyframes clouds {0% {transform: translateX(15px);}50% {transform: translateX(0px);}100% {transform: translateX(15px);}
}.card-header {display: flex;flex-direction: column;gap: 10px;
}.card-header span:first-child {word-break: break-all;font-weight: 800;font-size: 15px;line-height: 135%;color: rgba(87, 77, 51, 0.66);
}.card-header span:last-child {font-weight: 700;font-size: 15px;line-height: 135%;color: rgba(87, 77, 51, 0.33);
}.temp {position: absolute;left: 25px;bottom: 12px;font-weight: 700;font-size: 64px;line-height: 77px;color: rgba(87, 77, 51, 1);
}.temp-scale {width: 80px;height: 36px;position: absolute;right: 25px;bottom: 25px;display: flex;align-items: center;justify-content: center;background: rgba(0, 0, 0, 0.06);border-radius: 9px;
}.temp-scale span {font-weight: 700;font-size: 13px;line-height: 134.49%;color: rgba(87, 77, 51, 0.66);
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/421395.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

SwiftUI 纯手工打造 100% 可定制的导航栏

功能需求 何曾几时,我们是否也厌倦了 SwiftUI 界面中刻板守旧的导航栏外观,而想要自己动手充分展示灵动炸裂的创造力呢? 如上图所示:我们在 SwiftUI 中通过纯手工打造了一款 100 在本篇博文中,您将学到以下内容 功能需求1. 导航栏基本结构2. 如何感知当前发生用户拖拽行为…

Docker基础语法

目录 一.docker安装 二.docker基础名词 三.docker基础命令 四.命令别名 五.数据卷 六.挂载本地目录或文件 七.Docker镜像 八.网络 一.docker安装 1.安装yum工具 yum install -y yum-utils device-mapper-persistent-data lvm2 2.安装 docker yum源 yum-config-manag…

外汇天眼:每一个骗局的背后,可能是倾家荡产!

在网络科技还没有发达的以前&#xff0c;骗子主要通过线下揽客的方式推荐各类虚假的投资理财项目&#xff0c;有的甚至打着专门的理财咨询机构吸引了一大批新手投资者。在当时&#xff0c;外汇投资还不为多数人知道&#xff0c;随便忽悠“高利益保本”就有投资者上当受骗。 现如…

flinkcdc 3.0 尝鲜

本文会将从环境搭建到demo来全流程体验flinkcdc 3.0 包含了如下内容 flink1.18 standalone搭建doris 1fe1be 搭建整库数据同步测试各同步场景从检查点重启同步任务 环境搭建 flink环境(Standalone模式) 下载flink 1.18.0 链接 : https://archive.apache.org/dist/flink/flink…

YOLOv8改进 | 主干篇 | 低照度图像增强网络SCINet改进黑暗目标检测(全网独家首发)

一、本文介绍 本文给大家带来的改进机制是低照度图像增强网络SCINet,SCINet(自校正照明网络)是一种专为低光照图像增强设计的框架。它通过级联照明学习过程和权重共享机制来处理图像,优化了照明部分以提升图像质量。我将该网络集成在YOLOv8的主干上针对于图像的输入进行增…

网上训练补题

1.Codeforces Round 920 (Div. 3) A. 简单判断出边长即可 #include <stdio.h> #include <stdlib.h> #include <math.h> int main() {int n;scanf("%d", &n);while (n--){int x, y;scanf("%d%d", &x, &y);int e, f;scanf(&q…

SQL 注入总结(详细)

一、前言 这篇文章是最近学习 SQL 注入后的笔记&#xff0c;里面整理了 SQL 常见的注入方式&#xff0c;供大家学习了解 SQL 注入的原理及方法&#xff0c;也方便后续自己回顾&#xff0c;如有什么错误的地方欢迎指出&#xff01; 二、判断注入类型 按照注入点类型分类 数字型…

【Coding】寒假每日一题Day.5. 互质数的个数

题目来源 题目来自于AcWing平台&#xff1a;https://www.acwing.com/problem/content/4971/ 以blog的形式记录程序设计算法学习的过程&#xff0c;仅做学习记录之用。 题目描述 输入输出格式与数据范围 样例 第一组&#xff1a; 2 516第二组&#xff1a; 12 711943936思路…

SpringMVC(八)处理AJAX请求

一、处理AJAX之准备工作: 首先我们创建一个新的工程: 我们将pom.xml复制过来: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-in…

Excel乱码?教你3个简单解决方法!

“我在编辑一个文件时&#xff0c;Excel突然就乱码了&#xff0c;怎么会这样呢&#xff1f;这个文件对我来说是比较重要的&#xff01;有什么方法可以快速解决吗&#xff1f;” 在处理Excel文件时&#xff0c;我们有时会遇到乱码问题。乱码不仅影响数据的可读性&#xff0c;还可…

华清远见作业第三十一天——网络编程(第六天)

思维导图&#xff1a; 代码&#xff1a; 服务器&#xff1a; #include<stdio.h> #include<string.h> #include<stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <a.h> #define SER_PORT 10000 #define login 1 //登录…

《WebKit 技术内幕》之七(4): 渲染基础

4 WebKit软件渲染技术 4.1 软件渲染过程 在很多情况下&#xff0c;也就是没有那些需要硬件加速内容的时候&#xff08;包括但不限于CSS3 3D变形、CSS3 03D变换、WebGL和视频&#xff09;&#xff0c;WebKit可以使用软件渲染技术来完成页面的绘制工作&#xff08;除非读者强行…