因为还没学到后端和数据存储,所以里面的数据都是死数据,而且只是一个小练习,里面的内容还需要一定程度的优化

1.导航条

<!-- 导航栏 --><div class="nav"><!-- 导航栏内容 --><div class="nav_con"><div class="nav_left"><i class="iconfont icon-fanhui"></i></div><div class="nav_cen">出示假条</div><div class="nav_right"><i class="iconfont icon-wode">请出示请假条二维码</i></div></div></div>

导航条样式(使用css引入操作)

.nav{width: 400px;height: 64px;
}
.nav_con{width: 400px;height: 64px;background-color: rgb(0, 128, 23);color: white;position: fixed;top: 0;left: 0;right: 0;z-index: 999;display: flex;align-items: center;padding: 0 15px;
}
.nav_left{float: left;
}
.nav_left i{font-size: 22px;
}
.nav_cen{width: 100px;font-size: 20px;text-align: center;
}
.nav_right{margin-left: 120px;font-size: 20px;
}
.nav_right i{font-size: 15px;
}

2.中间部分

 <div class="cen"><!-- 主题内容 --><div class="cen_con"><div class="one"><h1>请假条</h1><h2>CSDN学校 HTML学院 </h2></div><div class="one_img"><img src="自己的图片.jpg" alt=""></div><div class="mk"><div class="two"><div class="two_img"><img src="一张图片审核通过的图片" alt=""></div><div class="two_txt"><h2> 姓名:<span>张三</span></h2><h3>性别:<span>男</span></h3><h3>院系:<span>2018级</span></h3><h3>学号:<span>0000000000</span></h3></div></div><div class="three"><h1>请假时间</h1><h2 style="font-size:14px; text-indent:3rem;">起<span style="font-size: 20px; margin-left: 50px;">2020-10-09 下午</span></h2><h2 style="font-size:14px ; text-indent:3rem;">至<span style="font-size: 20px;margin-left: 50px;">2020-10-09 下午</span></h2></div><div class="date"></div></div><div class="four"><h1>离校不出市</h1><h2>审批人:<span>李四</span></h2><h2>批准时间:<span>2022-20-09 12:59</span></h2></div></div></div>

中间部分CSS样式

.cen{width: 400px;height: 600px;border: 1px solid gray;border-radius: 15px 15px;background-color: white;box-shadow:0px 0px 20px 0px #88888888;margin-left:7px;box-sizing: border-box;padding: 0px 5px;
}
.one{display: inline-block;box-sizing: border-box;text-align: center;margin-left: 100px;}
.one h1{font-size: 22px;font-weight: 400;
}
.one h2{font-size: 16px;font-weight: 300;color: red;
}
.one_img{float: right;margin-top: 5px;margin-right: 20px;width: 100px;height: 90px;background-color: antiquewhite;
}
.one_img img{width: 100%;height: 100%;position: relative;}.two{margin: 5px 10px;height: 220px;
}
.two_img{width: 150px;height: 220px;float: left;}
.two_img img{width: 100%;height: 100%;
}
.two_txt{width: 200px;float: right;margin-top: 15px;
}
.two_txt h2{font-size: 19px;font-weight: 500;
}
.two_txt>h3{color: gray;font-size: 17px;font-weight: 300;
}.three{box-sizing: border-box;margin: 5px 0;padding: 0 10px;
}
.three h1{font-size: 20px;font-weight: normal;color: gray;border-bottom: 1px solid #ccc;
}
.three h2{color: gray;font-weight: 400;border-bottom:1px solid #ccc ;
}.four h1{font-size: 24px;font-weight: normal;color: red;text-align: center;/* background-color: antiquewhite; */margin-top:25px;margin-bottom: 25px;
}
.four h2{font-size: 17px;font-weight: normal;color: gray;text-align: center;
}

3.底部

<div class="wb"><a href="">点击返校<span class="iconfont icon-xiangyoujiantou"></span></a></div>

底部CSS样式

.wb{margin: 5px 150px;}
.wb a{text-decoration: none;color: blue;}

4.动态时间表示(此处使用JavaScrip)

 @keyframes move1{/* 最初状态:form{}最终状态:to{} */0%{transform: translateX(40px);transform: translateY(40px);opacity: 1;}33%{/* transform: translateX(100px); */transform: translateY(-200px);opacity: 1;}66%{transform: translateX(130px);opacity: 1;}100%{transform:translateY(-120px) ;opacity: 1;}}.date{position: absolute;top:200;width: 370px;font-size: 50px;font-weight: 600;color: #ccc;/* 指定要执行的关键帧动画(那个标签使用,添加在那个标签) */animation-name: move1;/* 动画需要时间 */animation-duration: 30s;/* 动画执行次数 */animation-iteration-count: 1000;/* 延迟执行 */animation-delay: 1s;}
<script>setInterval(function(){document.querySelector(".date").innerHTML = new Date().toLocaleString();},1000)
</script>

备注:代码中使用了阿里图标(iconfont),可以直接搜索使用

整体效果如下(时间为动态)

(以上代码,纯属娱乐,误伤及本人)

用HTML+CSS写一个请假条相关推荐

  1. [css] 请使用css写一个多级的下拉菜单

    [css] 请使用css写一个多级的下拉菜单 <!DOCTYPE html> <html lang="en"><head><meta ch ...

  2. [css] 请用css写一个扫码的加载动画图

    [css] 请用css写一个扫码的加载动画图 @Keyframes donut-spin { 0% { transform: rotate(0deg); } 100% { transform: rot ...

  3. 教你用 css 写一个拟物化图标

    拟物化(Skeuomorphism)风格的图标在iOS7发布之前广为流行.相当长一段时间,无论系统.网页还是第三方应用都争相使用拟物化的设计风格.那时候的dribbble网,各色优秀的拟物化设计作品也 ...

  4. android三角形切图软件,还在为小三角形切图?使用纯CSS写一个简单的三角形

    同学们,当美工给的设计图是这样: 或者这样: 我的内心其实是拒绝的-_-:但工作还得干,大部分同学会写 .icon{width:20px;height:20px;display:block;margi ...

  5. [css] 写一个动画,向上匀速移动100px,向下以1.5倍速度移动200px,一直反复循环

    [css] 写一个动画,向上匀速移动100px,向下以1.5倍速度移动200px,一直反复循环 .animation-block {width: 50px;height: 50px;backgroun ...

  6. [css] 写一个高度从0到auto的transition动画

    [css] 写一个高度从0到auto的transition动画 写不了吧,max-height 定值倒是可以 个人简介 我是歌谣,欢迎和大家一起交流前后端知识.放弃很容易, 但坚持一定很酷.欢迎大家一 ...

  7. [css] 使用css写一个垂直翻转图片的效果

    [css] 使用css写一个垂直翻转图片的效果 transform: rotateX(180deg); /* 垂直镜像翻转 */ 个人简介 我是歌谣,欢迎和大家一起交流前后端知识.放弃很容易, 但坚持 ...

  8. 基于JavaScript+css写一个简单的h5动态下雨效果

    基于JavaScript+css写一个简单的h5动态下雨效果 文章目录 什么是前端 展示效果 JavaScript是什么? 步骤 1.html 2.css 3.js 什么是前端 前端它是一个工作,它的 ...

  9. 用Html+css写一个渐变背景的个人名片

    原文地址:10分钟用Html+css写一个渐变背景的个人名片_网页制作_青青个人博客 个人名片在个人博客网站上的位置一般是在首页右上角,一点开网站就能看见,信息量并不多,但是对于访客说,可以直观快速的 ...

最新文章

  1. Qunee for HTML5 V2.5新版本发布
  2. k8s集群搭建教程(centos k8s搭建)
  3. 常考数据结构与算法:单调栈结构
  4. 【Python基础】高效的10个Pandas函数,你都用过吗?
  5. thinkphp URL相关
  6. [蓝桥杯][算法提高VIP]合并石子(区间dp+平行四边形优化)
  7. 链表之判断一个链表是否为回文结构(一)
  8. 推荐一个在线全自动智能图片背景扣除工具,效果杠杠的
  9. JavaScript事件处理程序的3种方式
  10. jstl-按照html的形式输出至页面
  11. c#程序设计语言杜松江版_C#程序设计语言复习题(试题及答案版)
  12. Axure 9注册码,亲测可用
  13. 百度低代码框架amis介绍及实例讲解
  14. 2021爱智先行者—精灵1号的体验分享
  15. PHP检查端口是否可以被绑定
  16. cuil:吹牛营销大师
  17. java毕业生设计医院分诊管理系统计算机源码+系统+mysql+调试部署+lw
  18. SQL数据库“正在恢复”,解决和查看方法
  19. STM32CubeMX安装及使用教程(一)
  20. [Windows]PDF转Word工具 需配合 WPS 使用

热门文章

  1. Delphi7企业原版_史上最经典的delphi 版本
  2. linux定时释放内存,定时释放Linux 内存 带释放记录
  3. fread函数和fwrite函数的用法
  4. 链X云英雄城市峰会|区块链技术落地数字化社区提升区域养老幸福指数
  5. 无刷直流电机的simulink仿真
  6. 下级对上级回复已阅知_下级对上级回复已阅知_工作中回复领导,绝不能用OK!除此之外,还有四条...
  7. cod16与战网服务器连接中断,《使命召唤16》无法连接服务器怎么解决 服务器连接解决攻略...
  8. MCNP5 粒子输运 常见问题汇总与踩坑记录(导火索:死循环)
  9. 物联网数据卡系统源码——物联网的主要应用领域
  10. OUC2021秋-计算机网络-期末(回忆版)