顾乔芝士网

持续更新的前后端开发技术栈

「春运专题」“春运倒计时第二天”(教你如何抢下铺)

工具/原料

360极速浏览器

方法/步骤

在电脑上运行360极速浏览器,如果电脑中没有,不仿装一个试试。进入12306网站主页面。

在订票中选中要坐的车次和日期,之后点击“预订”进入登录页面;按提示完成登录操作。

鼠标移动到席别选择位置,选择硬卧。之后在硬卧一栏处右键单击,选择“审查元素”,用左键单击。

按图所示,用鼠标点击该向下箭头,把页面中的蓝条往上拉一下,这样方便操作。

用豆包生成的BMI计算器_豆包比例

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BMI 计算器</title>
    <style>
        :root {
            --body-bg-start: #e8eaf6;
            --body-bg-end: #d1c4e9;
            --card-bg: rgba(255, 255, 255, 0.9);
            --button-gradient-start: #7e57c2;
            --button-gradient-end: #9575cd;
            --button-hover-gradient-start: #673ab7;
            --button-hover-gradient-end: #8e67c7;
            --input-border: #bdbdbd;
            --input-focus-border: #7e57c2;
            --underweight-bg: #b3e5fc;
            --normal-bg: #c8e6c9;
            --overweight-bg: #ffe0b2;
            --obese-bg: #ffcdd2;
            --text-color: #212121;
            --shadow-color: rgba(0, 0, 0, 0.1);
        }

        body {
            font-family: 'Roboto', sans-serif;
            background: linear-gradient(to bottom, var(--body-bg-start), var(--body-bg-end));
            color: var(--text-color);
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
        }

        .card {
            background-color: var(--card-bg);
            border-radius: 20px;
            box-shadow: 0 16px 32px var(--shadow-color);
            padding: 60px;
            width: 90%;
            max-width: 700px;
            box-sizing: border-box;
        }

        h1 {
            text-align: center;
            font-size: 32px;
            margin-bottom: 40px;
        }

        .input-group {
            margin-bottom: 30px;
        }

        label {
            display: block;
            margin-bottom: 12px;
            font-size: 20px;
            font-weight: 500;
        }

        input[type="number"] {
            width: 100%;
            padding: 18px;
            border: 1px solid var(--input-border);
            border-radius: 10px;
            transition: border-color 0.3s ease;
            font-size: 18px;
            box-sizing: border-box;
        }

        input[type="number"]:focus {
            border-color: var(--input-focus-border);
            outline: none;
        }

        button {
            width: 100%;
            padding: 18px;
            background: linear-gradient(to right, var(--button-gradient-start), var(--button-gradient-end));
            color: white;
            border: none;
            border-radius: 10px;
            box-shadow: 0 8px 16px var(--shadow-color);
            cursor: pointer;
            transition: background 0.3s ease;
            font-size: 20px;
            font-weight: 500;
        }

        button:hover {
            background: linear-gradient(to right, var(--button-hover-gradient-start), var(--button-hover-gradient-end));
        }

        #result {
            margin-top: 40px;
            padding: 30px;
            border-radius: 10px;
            text-align: center;
            display: none;
            font-size: 22px;
        }

        #result .bmi-value {
            font-size: 32px;
            font-weight: 700;
        }

        .danmaku {
            position: fixed;
            top: 0;
            right: 0;
            pointer-events: none;
            z-index: 999;
            white-space: nowrap;
            padding: 16px 32px;
            border-radius: 30px;
            color: white;
            background-color: hsl(calc(var(--random-hue, 0) * 360), 30%, 60%);
            animation: danmakuMove linear;
        }

        @keyframes danmakuMove {
            from {
                transform: translateX(100%);
            }
            to {
                transform: translateX(-100vw);
            }
        }
    </style>
</head>

<body>
    <div class="card">
        <h1>BMI 计算器</h1>
        <div class="input-group">
            <label for="height">你的身高(cm)</label>
            <input type="number" id="height" placeholder="请输入身高">
        </div>
        <div class="input-group">
            <label for="weight">你的体重(kg)</label>
            <input type="number" id="weight" placeholder="请输入体重">
        </div>
        <button onclick="calculateBMI()">计算 BMI</button>
        <div id="result"></div>
    </div>

    <script>
        function calculateBMI() {
            const height = parseFloat(document.getElementById('height').value);
            const weight = parseFloat(document.getElementById('weight').value);

            if (isNaN(height) || isNaN(weight) || height <= 0 || weight <= 0) {
                alert('请输入有效的身高和体重值。');
                return;
            }

            const bmi = (weight / ((height / 100) * (height / 100))).toFixed(2);
            let category = '';
            let message = '';
            let resultBg = '';

            if (bmi < 18.5) {
                category = '偏瘦';
                message = '风一吹,你怕是要像风筝一样飘走咯!';
                resultBg = getComputedStyle(document.documentElement).getPropertyValue('--underweight-bg');
            } else if (bmi >= 18.5 && bmi < 24) {
                category = '正常';
                message = '嘿,你这身材,老天爷赏饭吃的 “刚刚好” 呀!';
                resultBg = getComputedStyle(document.documentElement).getPropertyValue('--normal-bg');
            } else if (bmi >= 24 && bmi < 28) {
                category = '超重';
                message = '再胖点,你能去给熊猫当替身咯!';
                resultBg = getComputedStyle(document.documentElement).getPropertyValue('--overweight-bg');
            } else {
                category = '肥胖';
                message = '你不是胖,你是可爱到膨胀啦';
                resultBg = getComputedStyle(document.documentElement).getPropertyValue('--obese-bg');
            }

            const resultDiv = document.getElementById('result');
            resultDiv.innerHTML = `你的 BMI 值是:<span class="bmi-value">${bmi}</span>,体重分类:${category}`;
            resultDiv.style.display = 'block';
            resultDiv.style.backgroundColor = resultBg;

            generateDanmaku(message);
        }

        function generateDanmaku(message) {
            const numDanmaku = Math.floor(window.innerHeight / 50);
            for (let i = 0; i < numDanmaku; i++) {
                const danmaku = document.createElement('div');
                danmaku.classList.add('danmaku');
                danmaku.style.top = `${i * 50}px`;
                danmaku.style.setProperty('--random-hue', Math.random());
                danmaku.style.animationDuration = `${Math.random() * 8 + 4}s`;
                danmaku.textContent = message;
                document.body.appendChild(danmaku);

                danmaku.addEventListener('animationend', () => {
                    danmaku.remove();
                });
            }
        }
    </script>
</body>

</html>
    

写作排版简单三步就行-工具篇_写作排版软件

和我们工作中日常word排版内部交流不同,这篇教程介绍的写作排版主要是用于“微信公众号、头条号”网络展示。

写作展现的是我的思考,排版是让写作在网格上更好地展现。在写作上花费时间是有累积复利优势的,在排版上花费时间是无积累的,过多就是“浪费”。

因此如何在排版上更少的花费时间是我们的目的

一行代码实现display&quot;过渡动画&quot;原理

作者:Peter 谭老师

转发链接:
https://mp.weixin.qq.com/s/XhwPOv62gypzq5MhhP-5vg

写本文的起因

120个 实用CSS 技巧汇总合集_css教程大全

在前端开发中,CSS 往往是最被低估的一环。但真正优秀的开发者,往往懂得如何用 CSS 写出高效、优雅又强大的界面。

SpringBoot 实现在线查看内存对象拓扑图 —— 给 JVM 装上“透视眼”

0. 你将获得什么

一个可嵌入任何 Spring Boot 应用的内存对象拓扑服务:访问 /memviz.html 就能在浏览器看见对象图。

支持按类/包名过滤按对象大小高亮点击节点看详情

你的自我界限够强大吗?_自我界限什么意思

<span class="rs" style="display: block; margin-bottom: 10px; color: rgb(33, 154, 68); font-size: 14px; font-weight: bold; line-height: 24px; ">我的结果 : A、该设立新的界限</span><span class="desc" style="display: block; color: rgb(153, 153, 153); line-height: 24px; ">你很慷慨地给予别人时间和支持。遗憾的是,他们并没有跟你互惠互利。他们索取,并具有侵略性。你身边拥有的是一群穷人,这表明是时候设立新的界限了。让自己离开那些支配你的人,脱离跟自私的人的关系——他们占了你的便宜。</span>

日期联动效果实现指南_如何将日期和时间连接




日期联动效果实现指南

行内元素与块级元素,以及区别_行内元素和块级元素的区别有哪些

行内元素与块级元素

首先,CSS规范规定,每个元素都有display属性,确定该元素的类型,每个元素都有默认的display值,分别为块级(block)、行内(inline)。

块级元素:(以下列举比较常用的块级元素,详情可在w3cschool查询)

<div>定义文档中的分区或节

<h1>定义最大的标题

<h2>定义副标题

<h3>定义标题

<h4>定义标题

<h5>定义标题

<h6>定义最小的标题

<ul>定义无序列表

<ol>定义有序列表

<li>定义有序列表或无序列表的列表项目

<dl>定义自定义列表

<dd>定义自定义列表中的条目

<dt>定义自定义列表中的项目

<hr>创建一条水平线

<p>定义段落

<table>定义表格

<td>表格中的标准单元格

<th>定义表头单元格

<thead>标签定义表格的表头

<tr>定义表格中的行

自建开发工具IDE(一)之拖找排版—仙盟创梦IDE

编辑

自建拖拽布局排版在 IDE 中的优势及初学者开发指南

在软件开发领域,用户界面(UI)的设计至关重要。自建拖拽布局排版功能为集成开发环境(IDE)带来了诸多便利,尤其对于初学者而言,是踏入开发领域的有效途径。本文将结合给定的可编辑网页编辑器代码,探讨自建拖拽布局排版在 IDE 中的好处,以及初学者应如何学习开发此类功能。

<< < 36 37 38 39 40 41 42 43 44 45 > >>
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言