Html学习 2022年3月26日

这篇博客详细介绍了 Html 学习的过程,涵盖了从css动画到div布局、table布局、三列布局、垂直菜单以及仿朋友圈item页面布局等多个主题。通过各个步骤的学习和实践,实现了成功运行的效果。
摘要由CSDN通过智能技术生成

Html学习:

html第三课:动画效果

3.1 css动画

div{
   
  width: 100px;
  height: 100px;
  line-height: 100px;
  text-align: center;
  background-color: red;
  position: relative;
  animation: anim 5s infinite alternate;
  -webkit-animation: anim 5s infinite alternate;
}

@keyframes anim {
   

  0%{
   
    background-color: red;
    left:0px;
    top: 0px;
  }

  25%{
   
    background-color: blue;
    left:200px;
    top: 0px;
  }

  50%{
   
    background-color: greenyellow;
    left:200px;
    top: 200px;
  }

  75%{
   
    background-color: cyan;
    left:0px;
    top: 200px;
  }

  100%{
   
    background-color: mediumpurple;
    left:0px;
    top: 0px;
  }
}

3.2 引用

<div>
<h1>测试</h1>
</div>

run ,success!

第四课:div布局

4.1 css属性

.container{
   
  width: 100%;
  height: 100%;
  background-color: darkgray;
}

.header{
   
  width: 100%;
  height: 10%;
  background-color: mediumpurple;
}

.content{
   
  width: 100%;
  height: 80%;
  background-color: aliceblue;
  overflow: hidden;
}

.left{
   
  width: 20%;
  height: 100%;
  background-color: greenyellow;
  float: left;
}

.middle{
   
  width: 60%;
  height: 100%;
  background-color: purple;
  float: left;
}

.right{
   
  width: 20%;
  height: 100%;
  background-color: green;
  float: left;
}

.bottom{
   
  width: 100%;
  height: 10%;
  background-color: lightblue;
}

4.2 引用

<html>
<head></head>
<body>
<div class="container">
  <div class="header">
    头部
  </div<
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值