事件通信菜单

84 篇文章 0 订阅

事件通信菜单

教程地址原文地址(YouTube)

B站教程原文转载(bilibili)

两个视频的内容相同,第二个为转载

效果图

在这里插入图片描述

代码区

html

<!-- https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css -->
<div class="newsletter">
  <h1>
    Monthly
    <span>Newsletter</span>
  </h1>

  <p>Lorem ipsum dolor sit amet, natus sequi maxime assumenda.</p>

  <div class="txtb">
    <input type="text" placeholder="Enter Your Email Address">
    <button type="button"><i class="fas fa-arrow-right"></i></button>

  </div>
</div>

CSS

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans",sans-serif;
}

body{
  background: #786fa6;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter{
  background: linear-gradient(125deg,#778beb,#f8a5c2);
  width: 500px;
  padding: 60px;
  text-align: center;
  box-shadow: 0 0 20px #00000060;
}

.newsletter h1{
  text-transform: uppercase;
  color: #fff;
  font-size: 48px;
  line-height: 40px;
}

.newsletter h1 span{
  display: block;
  font-size: 38px;
}

.newsletter p{
  color: #fff;
  font-size: 14px;
  margin: 10px 0;
}

.txtb{
  width: 100%;
  height: 70px;
  background: #f1f1f199;
  border-radius: 40px;
  position: relative;
  margin-top: 40px;
}

.txtb input{
  width: 100%;
  height: 70px;
  border-radius: 40px;
  border: 0;
  background: none;
  padding: 0 30px;
  outline: none;
  font-size: 15px;
  padding-right: 80px;
}

.txtb button{
  background: #574b90;
  border: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  position: absolute;
  right: 10px;
  top: 10px;
  outline: none;
  cursor: pointer;
  color: #fff;
  transition: 0.3s linear;
}

.txtb button:hover{
  opacity: .5;
}

JS


教程地址原文地址(YouTube)

B站教程原文转载(bilibili)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值