写一个同环比计算的网站页面
同环比计算是大家日常比较广泛使用的内容,但是又不想通过Excel去复杂麻烦计算,那干脆来个网页版本的,将下面内容包材为xxx.html打开运行
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>同环比计算器(优化版)</title>
<meta name="description" content="免费在线同环比计算工具,支持批量输入本期、上期、上年同期数据,一键计算环比、同比、增长额、增长率,并生成折线图趋势对比。">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
margin: 0;
padding: 20px;
color: #333;
}
.container {
max-width: 1100px;
margin: 0 auto;
background: #fff;
border-radius: 16px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
overflow: hidden;
}
header {
background: linear-gradient(120deg, #4e54c8, #8f94fb);
color: #fff;
padding: 30px 20px;
text-align: center;
}
header h1 {
margin: 0;
font-size: 2.2em;
}
header p {
margin: 10px 0 0;
opacity: 0.9;
font-size: 1.1em;
}
.main {
padding: 30px;
}
.input-area {
margin-bottom: 30px;
}
textarea {
width: 100%;
height: 180px;
padding: 15px;
border: 2px solid #e1e5e9;
border-radius: 12px;
font-size: 16px;
resize: vertical;
transition: border 0.3s;
}
textarea:focus {
outline: none;
border-color: #4e54c8;
box-shadow: 0 0 0 4px rgba(78,84,200,0.1);
}
.tips {
margin: 15px 0;
padding: 12px 16px;
background: #f0f2ff;
border-left: 5px solid #4e54c8;
border-radius: 8px;
font-size: 14px;
color: #555;
}
button {
background: #4e54c8;
color: #fff;
border: none;
padding: 12px 30px;
font-size: 16px;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s;
}
button:hover {
background: #3b3fb0;
transform: translateY(-2px);
}
.result {
margin-top: 30px;
}
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
font-size: 15px;
}
th, td {
padding: 12px 10px;
text-align: center;
border-bottom: 1px solid #eee;
}
th {
background: #f8f9ff;
color: #4e54c8;
}
.positive {
color: #e74c3c;

最低0.47元/天 解锁文章
451

被折叠的 条评论
为什么被折叠?



