<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>素材 | 实时字符计数器</title>
<link rel="icon" href="https://haiyong.site/img/favicon.png" sizes="192x192" />
<style media="screen">
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background: url("https://img-blog.csdnimg.cn/6786619ec66e41a7875a01375f28b0da.png" );
background-repeat: no-repeat;
background-position: center;
background-size: cover;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Roboto', sans-serif;
}
.container {
width: 500px;
padding: 40px;
background-color: white;
display: flex;
flex-direction: column;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
border-radius: 5px;
}
.container h2 {
font-size: 2rem;
margin: -40px -40px 50px -40px;
text-align: center;
background: rgb(29, 98, 203);
color: #fff;
}
.container textarea {
position: relative;
margin-bottom: 20px;
resize: none;
height: 200px;
width: 100% !important;
padding: 10px;
border: none;
border-radius: 5px;
outline: none;
font-size: 1rem;
font-family: 'Roboto', sans-serif;
box-shadow: 0 0 10px rgba(0,139,253,0.45);
letter-spacing: 0.1rem;
}
.container p {
display: flex;
align-items: center;
font-size: 1.25rem;
color: #333;
}
.container p .counter {
font-size: 2rem;
color:#0fb612;
box-shadow: 0 0 10px rgba(0,139,253,0.45);
width: 40px;
height: 40px;
text-align: center;
font-weight: 700;
margin-left: 10px;
}
.page-footer {
position: fixed;
right: 35px;
bottom: 20px;
display: flex;
align-items: center;
padding: 5px;
color: black;
background: rgba(255, 255, 255, 0.65);
}
.page-footer a {
display: flex;
margin-left: 4px;
}
.touxiang{
bottom: 0px;
width:30px;
height:30px;
}
</style>
</head>
<body>
<div class="container">
<h2>实时字符计数器</h2>
<textarea name="textarea" id="textarea" cols="30" rows="10" placeholder="输入你的文字" onkeyup="countingCharacter();"></textarea>
<p>您输入的字符总数: <span class="counter">0</span></p>
</div>
<script type="text/javascript">
const textarea = document.querySelector('textarea');
const counter = document.querySelector('.counter');
function countingCharacter() {
const text = textarea.value;
const textLength = textarea.value.length;
counter.innerText = `${textLength}`;
}
</script>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
【前端素材】小游戏-工具-22.实时字符计数器.zip
共1个文件
html:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 149 浏览量
2024-04-04
17:44:34
上传
评论
收藏 2KB ZIP 举报
温馨提示
【技术分析】 HTML,是一种制作万维网页面的标准语言,它消除了不同计算机之间信息交流的障碍; CSS,可以帮助把网页外观做得更加美观; JavaScript,是一种轻量级的解释型编程语言; jQuery,使用户能更方便地处理HTML documents、events、实现动画效果,并且方便地为网站提供AJAX交互; Bootstrap 是快速开发 Web 应用程序的前端工具包。它是一个 CSS,HTML 和 JS 的集合,它使用了最新的浏览器技术,给你的 Web 开发提供了时尚的版式; AJAX,创建交互式网页应用的网页开发技术。 前端游戏设计是游戏开发中至关重要的一部分,它涉及到游戏的外观、交互和用户体验等方面。以下是一些前端游戏设计的思路和关键点: 用户体验:确保游戏界面简洁直观,易于操作。考虑用户的需求和习惯,设计友好的用户界面,包括按钮、菜单、指引等,以提升用户体验。 视觉设计:选择合适的配色方案、图标和界面元素,保持视觉风格一致性。优秀的视觉设计可以提升游戏的吸引力和品质感。 动画效果:运用动画效果增强游戏的交互性和趣味性。动画可以使游戏更生动,提升用户参与感。 响应式设计:确保游戏在不同设备上都能正常展示和运行,包括PC、平板和手机等。响应式设计可以提高游戏的可访问性和用户覆盖范围。
资源推荐
资源详情
资源评论
收起资源包目录
【前端素材】小游戏-工具-22.实时字符计数器.zip (1个子文件)
工具-22.实时字符计数器
zifu.html 3KB
共 1 条
- 1
资源评论
枫蜜柚子茶
- 粉丝: 5827
- 资源: 2808
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功