模仿一个B站的up主实现一个有趣的页面效果。

本文介绍了如何通过JavaScript和CSS来实现一个与B站UP主相似的有趣页面效果。提供了完整的代码,可以直接运行查看效果。如果有任何疑问,作者欢迎读者进行交流讨论。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

下面是全部的代码啦,比较简单,up主的是另一种实现方法,(up主的链接:https://www.bilibili.com/video/BV1Jp4y1y75i/?spm_id_from=333.788.videocard.7

代码复制后直接运行就可以看到效果了,如果有什么问题大家可以交流,谢谢

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* 建议css js分开写,这里偷了一下懒 */
    *{
      padding: 0;
      margin: 0;
    }
    body{
      background-color: rgba(37,55,70,1);
    }
    input,button{
      border:0;
      outline: 0;
      background-color: transparent;
      color:#fff;
      font-size: 12px;
    }
    input::placeholder{
      color:#fff;
    }
    .bili_form{
      color: #fff;
    border-radius: 15px;
    text-align: center;
    width: 200px;
    height: 265px;
    border: 1px solid rgb(41, 60, 77);
    box-shadow: 
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值