首页 > 其他分享 >【每日一练】16—响应式电子日历效果的实现

【每日一练】16—响应式电子日历效果的实现

时间:2022-11-07 17:08:41浏览次数:47  
标签:16 color 日历 header month 响应 calendar font size

【每日一练】16—响应式电子日历效果的实现_5e


写在前面

今天练习的小项目是一个电子日历,这个日历我个人觉得还是非常实用的,现在,我们一起来看一下最终的效果:

【每日一练】16—响应式电子日历效果的实现_5e_02

HTML代码:

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>【每日一练】16—响应式电子日历效果的实现</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/js-year-calendar@latest/dist/js-year-calendar.min.css" />
</head>
<body>
<div class="calendar"></div>
<script src="https://unpkg.com/js-year-calendar@latest/dist/js-year-calendar.min.js"></script>
<script>
new Calendar(document.querySelector('.calendar'));
</script>
</body>
</html>

CSS代码:

*
{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Quicksand', sans-serif;
}
body
{
background: #f1fbff;
}
.calendar
{
padding: 20px 40px;
}
.months-container
{
justify-content: center;
gap: 40px;
}
.calendar .months-container .month-container
{
background: #ffffff;
padding: 20px 0;
min-width: 280px;
box-shadow: 15px 15px 40px rgba(0,0,0,0.15);
}
.calendar table.month th.month-title
{
color: #5a8990;
font-size: 1.9em;
font-family: 'Dancing Script', cursive;
font-weight: 200;
}
.month tr td:first-child,
.month tr td:last-child,
.month thead tr:nth-child(2) th:first-child,
.month thead tr:nth-child(2) th:last-child
{
color: #f75c90;
}
.calendar table.month td.day .day-content
{
padding: 6px 8px;
}
.calendar table.month th.day-header
{
color: #777;
font-weight: 700;
font-size: 0.9em;
}
.month tr td
{
color: #777;
font-weight: 500;
font-size: 0.9em;
}
table.month td.day .day-content:hover
{
background: #f75c90;
color: #fff;
font-weight: 500;
}


.calendar .calendar-header
{
border: none;
}
.calendar .calendar-header table th:hover
{
background: transparent;
}
.calendar .calendar-header .year-title
{
font-family: 'Dancing Script', cursive;
font-size: 4em;
color: #f75c90;
}
.calendar .calendar-header .year-neighbor
{
font-size: 2.25em;
}
.calendar .calendar-header .year-neighbor2
{
font-size: 1em;
}

写在最后

以上就是今天的【每日一练】的全部内容,希望今天的小练习对你有用,如果你觉得有帮助的话,请点赞我,关注我,并将它分享给你身边做开发的朋友,也许能够帮助到他。

我是杨小爱,我们明天见。

【每日一练】16—响应式电子日历效果的实现_html_03


【每日一练】16—响应式电子日历效果的实现_html_04


标签:16,color,日历,header,month,响应,calendar,font,size
From: https://blog.51cto.com/u_15809510/5830058

相关文章

  • HTTP的请求与响应
    http请求浏览器中输入url后,浏览器向网站所在服务器发送了一个请求,网站服务器接收请求,并对这个请求进行处理和解析,然后返回对应的响应,传回给浏览器,再通过浏览器解析出来请......
  • VMware 16 安装 CentOS Stream
    环境版本Windows10VMwareWorkstation16ProCentOS8-stream下载CentOS8stream安装包点击阿里云开源镜像站或网易开源镜像站,选择要下载的版......
  • Win 10 安装 VMware 16
    安装版本Windows10(win7及以下不支持)VMwareWorkstation16.2.2点击下载地址下载指定版本的VMwareWorkstation。步骤双击下载的安装包开始安装。......
  • vue面试之Composition-API响应式包装对象原理
    本文主要分以下两个部分对CompositionAPI的原理进行解读:reactiveAPI原理refAPI原理reactiveAPI原理打开源码可以找到reactive的入口,在composition-api/src/......
  • P1627 [CQOI2009] 中位数
    Idea注意到中位数只关心数据的相对大小,因此考虑从目标数字开始往两边求前/后缀和,接下来使用乘法原理来进行组合即可.可以用map统计.第一次感觉只要看一看扩展,当时......
  • 816. 模糊坐标 ----- 分而治之思路、back()、empty()、substr()用法
    我们有一些二维坐标,如 "(1,3)" 或 "(2,0.5)",然后我们移除所有逗号,小数点和空格,得到一个字符串S。返回所有可能的原始字符串到一个列表中。原始的坐标表示法不会存在......
  • iOS 升级到XCode14后适配iOS16
    1、解决xcode14运行报错运行遇到的报错“error:Signingfor“XX”requiresadevelopmentteam.在podfile文件中添加如下内容设置User-DefinedCODE_SIGNING_ALLOWE......
  • [LeetCode] 1678. Goal Parser Interpretation
    Youowna GoalParser thatcaninterpretastring command.The command consistsofanalphabetof "G", "()" and/or "(al)" insomeorder.TheGoalPar......
  • 4.responed响应
    输出字符流  字节流响应数据  1.响应乱码问题    两种方式,第二种更简单  字节乱码同样方法解决 2.重定向  ......
  • CF1685E The Ultimate LIS Problem 题解
    LinkCF1685ETheUltimateLISProblem题意概述给定长为\(2n+1\)的排列,对于\(m\)次交换操作,求出每次操作后一个能使排列\(\text{LIS}\leqn\)的循环移位\(k\),......