使用 html css 和 javascript 的计算器 ui 的未来

使用 html css 和 javascript 的计算器 ui 的未来

无阶未来模型擂台/AI 应用平台 无阶未来模型擂台/AI 应用平台

无阶未来模型擂台/AI 应用平台,一站式模型+应用平台

无阶未来模型擂台/AI 应用平台 35 查看详情 无阶未来模型擂台/AI 应用平台

      Neon Glass Calculator     *{    box-sizing: border-box;    margin: 0;    padding: 0;   }   body{    font-family: "Poppins",sans-serif;    background: linear-gradient(135deg, #000428, #004e92);    height: 100vh;    display: flex;    justify-content: center;    align-items: center;   }   .calculator{    background: rgba(255, 255, 255, 0.1);      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);      backdrop-filter: blur(10px);      border-radius: 20px;      padding: 20px;      width: 350px;      max-width: 90%;   }   .display {      background: rgba(255, 255, 255, 0.2);      box-shadow: inset 0 4px 12px rgba(255, 255, 255, 0.5);      color: #fff;      font-size: 2.5rem;      text-align: right;      padding: 20px 10px;      border-radius: 10px;      margin-bottom: 20px;    }    .buttons {      display: grid;      grid-template-columns: repeat(4, 1fr);      gap: 15px;    }    button {      background: rgba(255, 255, 255, 0.1);      border: none;      box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4), 0 0 10px rgba(0, 255, 255, 0.7) inset;      color: #fff;      font-size: 1.5rem;      padding: 20px;      border-radius: 12px;      transition: transform 0.3s, box-shadow 0.3s;      cursor: pointer;    }    button:active {      transform: scale(0.95);      box-shadow: 0 4px 25px rgba(0, 255, 255, 0.6), 0 0 15px rgba(0, 255, 255, 1) inset;    }    button.operator {      background: rgba(255, 255, 255, 0.2);      color: #00ffff;      box-shadow: 0 4px 15px rgba(255, 165, 0, 0.5), 0 0 10px rgba(255, 165, 0, 0.7) inset;    }    button.operator:active {      box-shadow: 0 4px 25px rgba(255, 165, 0, 0.7), 0 0 15px rgba(255, 165, 0, 1) inset;    }    
0
const display = document.getElementById("display"); function inputDigit(digit) { if (display.innerText === "0") { display.innerText = digit; } else { display.innerText += digit; } } function inputOperator(operator) { const lastChar = display.innerText.slice(-1); if ("+-*/".includes(lastChar)) { display.innerText = display.innerText.slice(0, -1) + operator; } else { display.innerText += operator; } } function clearDisplay() { display.innerText = "0"; } function deleteDigit() { display.innerText = display.innerText.slice(0, -1) || "0"; } function calculate() { try { display.innerText = eval(display.innerText); } catch { display.innerText = "Error"; } }

以上就是使用 html css 和 javascript 的计算器 ui 的未来的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/388460.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
电脑数据丢失如何恢复 三种有效解决方法分享
上一篇 2025年11月6日 14:41:22
如何查看docker中mysql的版本
下一篇 2025年11月6日 14:41:26

相关推荐

发表回复

登录后才能评论
关注微信