웹 프론트엔드 JS 튜토리얼 나는 처음부터 ULTIMATE 교육 웹사이트를 구축했습니다 — 3일차

나는 처음부터 ULTIMATE 교육 웹사이트를 구축했습니다 — 3일차

Jan 11, 2025 am 10:58 AM

I Built the ULTIMATE Educational Website from Scratch — Day 3

많은 분들이 이 일에 얼마나 시간을 할애할 것인지 묻더군요. 나는 2~3주 정도 걸릴 것 같았다. 하지만 그 질문은 내가 웹사이트에서 얼마나 많은 시간을 보내고 있는지 다시 생각하게 만들었습니다. 홈페이지에만 8시간을 보냈습니다. 그래서 예전처럼 세세한 부분에 집중하지 않고 빠르게 콘텐츠를 만들기로 했어요. 여러분의 관심을 많이 낭비했습니다. 이제 바로 프로세스를 시작하겠습니다.

19시간: 화학 콘텐츠 페이지 만들기

Chemistry/3/ 디렉터리 내에 periodicity-of-elements-qa.html 파일을 만드는 것부터 시작하겠습니다. 이 페이지에는 요소의 주기성에 관한 질문과 답변이 포함되어 있습니다.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Periodicity of Elements - Questions and Answers</title>
        <!-- styles and scripts -->
</head>
<body>
    <header>
        <nav>
            <div>



<p>As usual, I included a basic HTML boilerplate with links to necessary scripts and styles, along with navigation to main pages. I am using a container div, aside element with the id table-of-contents, which will be populated using javascript, and finally the main tag.</p>

<p>Next, I added the content, formatted with heading tags and some paragraph tags for the main body. For formulas and symbols I used the LaTeX syntax, LaTeX is used because it is the go-to standard:<br>
</p>

<pre class="brush:php;toolbar:false">            <h2>



<p>This contains a lot of content, which is formatted using headings and sub-headings, some lists and tables. I also added an "About the Author" tag for authenticity.</p>

<p>I needed to style this page so that the text can be readable, and it doesn't look too bad. I will add an additional css file into this page, keeping style.css and style-main.css for common elements.</p>

<h2>
  
  
  Hour 20: Styling the content page and adding JS for dynamic Table of Contents
</h2>

<p>I created an style tag inside the head element, and added basic style to it:<br>
</p>

<pre class="brush:php;toolbar:false">     <style>
header {
    background: linear-gradient(135deg, #252525 0%, #303030 100%); /* Subtle gradient for depth */
    padding: 1.2rem 0; /* Slightly increased padding */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* More pronounced, darker shadow */
    position: sticky;
    top: 0;
    z-index: 1000; /* Increased z-index for better layering */
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out; /* Smooth transition for sticky effect */
    transform: translateY(0); /* Initial state for smooth sticky animation */
}

header.sticky-active {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); /* Different shadow when sticky */
    transform: translateY(-5px); /* Slight lift when sticky */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px; /* Slightly increased side padding */
}

.logo {
    font-size: 2rem; /* Slightly larger logo */
    font-weight: 700; /* Bolder logo */
    color: #7db4ff; /* Updated logo color, slightly lighter */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); /* Subtle text shadow for depth */
    transition: transform 0.3s ease-in-out;
}

.logo:hover {
    transform: scale(1.05); /* Gentle scale on hover */
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px; /* Use gap for spacing between list items */
}

nav ul li a {
    text-decoration: none;
    color: #f0f0f0; /* Slightly brighter text color */
    position: relative; /* For the underline effect */
    padding-bottom: 4px; /* Space for the underline */
    transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
    overflow: hidden; /* Clip the pseudo-element */
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #7db4ff; /* Same as logo color for consistency */
    transform: scaleX(0); /* Initially hidden */
    transform-origin: bottom right;
    transition: transform 0.4s ease-out;
}

nav ul li a:hover {
    color: #90caf9; /* Lighter hover color */
    transform: translateY(-2px); /* Slight lift on hover */
}

nav ul li a:hover::before {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Optional: Add an active state highlight */
nav ul li a.active {
    color: #90caf9;
    font-weight: 600;
}

nav ul li a.active::before {
    transform: scaleX(1);
}

/* Enhancements for Mobile (consider using JavaScript for more advanced mobile menus) */
@media (max-width: 1024px) {
    header {
        display: hidden;
    }
}
        :root {
    --primary-bg: #f9f9f9; /* Very light grey for a softer white */
    --secondary-bg: #ffffff; /* Pure white for content areas */
    --text-primary: #212121; /* Dark grey for primary text */
    --text-secondary: #757575; /* Medium grey for secondary text */
    --accent-color: #2962ff; /* A vibrant blue */
    --hover-color: #5393ff; /* Lighter blue for hover states */
    --border-color: #e0e0e0; /* Light grey for borders */
    --code-bg: #f0f0f0; /* Very light grey for code backgrounds */
    --code-text: #333333; /* Dark grey for code text */
    --toc-active: #2962ff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
}

body {
    font-family: 'Roboto', sans-serif; /* A clean and modern sans-serif font */
    line-height: 1.6;
    margin: 0;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    padding-bottom: 40px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Custom Scrollbar - Light theme version */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background-color: #bdbdbd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #9e9e9e;
}

.container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 60px;
    background-color: var(--secondary-bg);
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    display: grid;
    grid-template-columns: minmax(250px, 300px) 1fr;
    gap: 40px;
}

#table-of-contents {
    padding: 30px;
    background-color: var(--secondary-bg);
    border-radius: 6px;
    position: sticky;
    top: 30px;
    height: fit-content;
    border: 1px solid var(--border-color);
}

/* Custom Scrollbar for Table of Contents */
#table-of-contents::-webkit-scrollbar {
    width: 6px; /* Thinner scrollbar */
}

#table-of-contents::-webkit-scrollbar-track {
    background: #f1f1f1; /* Light background for the track */
    border-radius: 3px; /* Slightly rounded track */
}

#table-of-contents::-webkit-scrollbar-thumb {
    background-color: #bdbdbd; /* Medium grey for the thumb */
    border-radius: 3px; /* Slightly rounded thumb */
}

#table-of-contents::-webkit-scrollbar-thumb:hover {
    background-color: #9e9e9e; /* Darker grey on hover */
}

#table-of-contents > h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    text-align: left;
}

#table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#table-of-contents li {
    margin-bottom: 10px;
    padding-left: 0;
    border-left: 3px solid transparent;
    transition: border-left-color var(--transition-fast), color var(--transition-fast);
}

#table-of-contents li:hover,
#table-of-contents li.active {
    border-left-color: var(--toc-active);
}

#table-of-contents li.active > a {
    color: var(--toc-active);
    font-weight: 500;
}

#table-of-contents a {
    text-decoration: none;
    color: var(--text-secondary);
    display: block;
    padding: 6px 0;
    transition: color var(--transition-fast);
}

#table-of-contents a:hover {
    color: var(--hover-color);
}

#table-of-contents ul ul {
    margin-left: 15px;
    margin-top: 6px;
}

/* Main content styles - Focus on readability */
main {
    padding: 40px;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--secondary-bg);
    box-shadow: var(--shadow-sm);
}

main > *:not(:last-child) {
    margin-bottom: 2em;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.4em;
    margin-bottom: 1em;
}

h2 {
    font-size: 24px;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 0.3em;
    margin-bottom: 0.9em;
    color: var(--accent-color);
}

h3 {
    font-size: 1.6rem;
    margin-bottom: 0.7em;
}

h4 {
    font-size: 1.4rem;
    margin-bottom: 0.6em;
}

p {
    margin-bottom: 1.5em;
    color: var(--text-secondary);
    orphans: 3;
    widows: 3;
    word-break: break-word;
}

ul, ol {
    margin-left: 25px;
    margin-bottom: 1.7em;
}

li {
    margin-bottom: 0.7em;
    color: var(--text-secondary);
    line-height: 1.5;
    word-break: break-word;
}

strong {
    font-weight: 600;
    color: var(--text-primary);
}

em {
    font-style: italic;
    color: var(--accent-color);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-fast);
    border-bottom: 1px solid transparent; /* Subtle underline on hover */
}

a:hover {
    color: var(--hover-color);
    border-bottom-color: var(--hover-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--secondary-bg);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    word-break: break-word;
}

th {
    background-color: #f5f5f5; /* Lighter header background */
    font-weight: 600;
    color: var(--text-primary);
}

tbody tr:nth-child(even) {
    background-color: #fafafa; /* Very light grey for even rows */
}

/* Code blocks - Light theme styling */
pre {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 12px 18px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.6em;
    white-space: pre-wrap;
    border: 1px solid var(--border-color);
}

code {
    font-family: 'Menlo', monospace;
    background-color: #e8e8e8; /* Even lighter background for inline code */
    color: var(--code-text);
    padding: 3px 6px;
    border-radius: 3px;
    word-break: break-word;
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* Horizontal rules - Simpler style */
hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 2em 0;
}

/* Blockquotes - Clean separation */
blockquote {
    border-left: 3px solid var(--accent-color);
    padding: 10px 15px;
    margin: 1.5em 0;
    font-style: italic;
    background-color: #f5f5f5;
    border-radius: 3px;
    color: var(--text-secondary);
}

blockquote p {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .container {
        max-width: 90%;
        padding: 50px;
        grid-template-columns: 1fr;
        gap: 30px;
    }

    #table-of-contents {
        position: static;
        margin-bottom: 30px;
    }

    #table-of-contents > h2 {
        text-align: center;
    }
}

@media (max-width: 768px) {
    main {
        padding: 30px;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 22px;
    }
    nav{
        display:none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 20px;
    }
}
    </style>
로그인 후 복사

이것은 요소가 읽기 쉽고 너무 산만하지 않으며 웹사이트 전체에서 일관되도록 하기 위해 헤더와 기본 콘텐츠를 일부 변경한 기본 스타일입니다.
또한 가독성을 높이기 위해 표, 인용부호, 코드 블록에 CSS를 추가했습니다.

또한 왼쪽의 목차를 대화형으로 만드는 스크립트를 추가하고 싶었습니다. 그래서 본문 태그 하단에 다음 스크립트를 추가했습니다.

<script>
        // script.js
document.addEventListener('DOMContentLoaded', () => {
    const mainContent = document.querySelector('main');
    const tableOfContents = document.getElementById('table-of-contents');

    if (!mainContent || !tableOfContents) {
        console.error('Main content or table of contents element not found.');
        return;
    }

    const headings = mainContent.querySelectorAll('h2, h3, h4');
    const tocList = document.createElement('ul');

    let currentList = tocList;
    const stack = [currentList];

    headings.forEach(heading => {
        const tagName = heading.tagName;
        const id = heading.id;
        const text = heading.textContent;

        if (id) {
            const listItem = document.createElement('li');
            const link = document.createElement('a');
            link.href = `#${id}`;
            link.textContent = text;
            listItem.appendChild(link);

            if (tagName === 'H2') {
                while (stack.length > 1) {
                    stack.pop();
                }
                currentList = stack[stack.length - 1];
                currentList.appendChild(listItem);
                stack.push(document.createElement('ul'));
                currentList = stack[stack.length - 1];
                listItem.appendChild(currentList);
            } else if (tagName === 'H3') {
                while (stack.length > 2) {
                    stack.pop();
                }
                currentList = stack[stack.length - 1];
                currentList.appendChild(listItem);
                stack.push(document.createElement('ul'));
                currentList = stack[stack.length - 1];
                listItem.appendChild(currentList);
            } else if (tagName === 'H4') {
                while (stack.length > 3) {
                    stack.pop();
                }
                currentList = stack[stack.length - 1];
                currentList.appendChild(listItem);
            }
        }
    });

    // Remove any empty ul elements that might have been created
    function removeEmptyLists(list) {
        Array.from(list.children).forEach(item => {
            if (item.tagName === 'UL' && item.children.length === 0) {
                item.remove();
            } else if (item.tagName === 'LI') {
                const childUl = item.querySelector('ul');
                if (childUl) {
                    removeEmptyLists(childUl);
                }
            }
        });
    }
    removeEmptyLists(tocList);

    const tocTitle = document.createElement('h2');
    tocTitle.textContent = 'Table of Contents';
    tableOfContents.appendChild(tocTitle);
    tableOfContents.appendChild(tocList);
});
    </script>
로그인 후 복사

이 스크립트는 기본 요소의 제목에서 중첩된 목차를 자동으로 생성하며 원활하게 작동합니다. 스크립트는 이전에 생성한 목차 옆 태그를 자동으로 채웁니다.

마지막으로 head 태그 내에 이러한 스크립트와 링크 태그를 추가하여 LaTeX 수식 및 방정식에 대한 지원을 추가했습니다.

        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css">
        <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js"></script>
        <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js"></script>
        <script>
            document.addEventListener("DOMContentLoaded", function () {
                renderMathInElement(document.body, {
                    delimiters: [
                        { left: "$", right: "$", display: false },
                        { left: "$$", right: "$$", display: true }
                    ]
                });
            });
        </script>
로그인 후 복사

이제 콘텐츠 페이지가 완성되었습니다. 디자인이 매우 미니멀하고 콘텐츠에 방해가 되지 않으면서 필요한 모든 기능을 갖추고 있다는 점이 마음에 듭니다.
콘텐츠를 직접 복사하는 대신 라이브 버전에서 어떻게 보이는지 확인하려면 여기를 참조하세요. 요소의 주기성 - 질문과 답변

21~25시간: 화학 콘텐츠 페이지 작성

Chemistry/3/ 폴더 안에 periodicity-of-elements-notes.html 파일을 생성하겠습니다. 여기에는 요소의 주기성에 대한 참고 사항이 포함됩니다.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Periodicity of Elements - Notes</title>
    <!-- styles and scripts -->
</head>
<body>
    <header>
        <nav>
            <div>



<p>This is the same base HTML structure as the previous file, periodicity-of-elements-qa.html. </p>

<p>Now, for the most time consuming part, copying over the massive text of the notes and formating it with headings, paragraphs, and lists. I've also used LaTeX syntax where appropriate.<br>
</p>

<pre class="brush:php;toolbar:false">            <h1>
                Structure of Periodic Table
            </h1>

            <h2>



<p>I've added the base CSS from before, but I also added new CSS to style the calculator container, did I mention, this page also has a calculator, for interactivity:<br>
</p>

<pre class="brush:php;toolbar:false"> <style for="Calculator">
            /* Light Mode Styles */
            .calculator-container {
                background-color: #f5f5f5; /* Light background */
                padding: 20px;
                border-radius: 8px;
                box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
                margin: 20px 0;
            }

            .calculator-controls {
                display: flex;
                gap: 10px;
                margin-bottom: 20px;
            }

            .calculator-controls input,
            .calculator-controls button {
                padding: 10px;
                border-radius: 4px;
                border: 1px solid #ccc; /* Light border */
                background-color: #fff; /* White background */
                color: #333; /* Dark text */
                transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Added box-shadow transition */
            }

            .calculator-controls input:focus,
            .calculator-controls button:focus {
                outline: none;
                box-shadow: 0 0 5px #3498db; /* Focus highlight (same as dark mode) */
            }

            .calculator-controls input {
                flex: 2;
            }

            .calculator-controls button {
                flex: 1;
            }

            .calculator-controls button:hover {
                background-color: #e0e0e0; /* Slightly darker on hover */
                cursor: pointer;
            }

            #calculator-output {
                overflow-x: auto;
            }

            #calculator-output table {
                width: 100%;
                border-collapse: collapse;
                margin-top: 10px;
                box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
            }

            #calculator-output th,
            #calculator-output td {
                border: 1px solid #ccc; /* Light border */
                padding: 8px;
                text-align: left;
            }

            #calculator-output th {
                background-color: #3498db; /* Header color (same as dark mode) */
                color: white;
            }

            #calculator-output tr:nth-child(even) {
                background-color: #f0f0f0; /* Slightly darker for even rows */
            }

            #calculator-output tr:hover {
                background-color: #e8e8e8; /* Slightly darker on hover */
            }

            /* Loading Spinner */
            .loading-spinner {
                border: 4px solid #ccc; /* Light border */
                border-top: 4px solid #3498db; /* Spinner color (same as dark mode) */
                border-radius: 50%;
                width: 30px;
                height: 30px;
                animation: spin 1s linear infinite;
                margin: 20px auto;
                display: none;
            }

            @keyframes spin {
                0% {
                    transform: rotate(0deg);
                }
                100% {
                    transform: rotate(360deg);
                }
            }

            .calculator-container h2 {
                margin-top: 0;
                color: #333; /* Darker text color for heading */
            }
        </style>
로그인 후 복사

아주 베이직한 스타일인데 지금은 괜찮네요

그런 다음 이전과 마찬가지로 목차에 대한 JavaScript를 추가하고 요소 속성 표를 생성하는 스크립트를 추가했습니다.

 <스크립트>
        document.addEventListener('DOMContentLoaded', function () {
        let elementInput = document.getElementById('element-input');
        계산Btn = document.getElementById('calculate-btn');
        let CalculatorOutput = document.getElementById('calculator-output');

        const 요소데이터 = {
        "시간": {
        "Hfg_298_15K": -241.8,
        "Hfg_0K": -217.8,
        "Entropy_298_15K": 130.7,
        "Integrated_Heat_Capacity_0_to_298_15K": 25.7,
        "Heat_Capacity_298_15K": 28.8,
        "전자_에너지_레벨": [1216.5, 1025.7],
        "이온화_에너지": 13.6,
        "전자 친화력": 0.75
      },
        "그": {
        "Hfg_298_15K": 0,
        "Hfg_0K": 0,
        "Entropy_298_15K": 126.1,
        "Integrated_Heat_Capacity_0_to_298_15K": 20.8,
        "Heat_Capacity_298_15K": 20.8,
        "전자_에너지_레벨": [159850, 169084, 171133],
        "이온화_에너지": 24.6,
        "전자 친화도": -0.08
        },
          "리": {
            "Hfg_298_15K": 159.3,
            "Hfg_0K": 155.3,
            "Entropy_298_15K": 29.1,
            "Integrated_Heat_Capacity_0_to_298_15K": 22.8,
            "Heat_Capacity_298_15K": 24.8,
            "전자_에너지_레벨": [14908, 17159],
            "이온화_에너지": 5.39,
            "전자 친화도": 0.61
            },
            "BE": {
                "Hfg_298_15K": 324.3,
                "Hfg_0K": 315.3,
                "Entropy_298_15K": 9.5,
                "Integrated_Heat_Capacity_0_to_298_15K": 16.8,
                "Heat_Capacity_298_15K": 16.7,
                "전자_에너지_레벨": [21978, 38178],
                "이온화_에너지": 9.32,
                "Electron_Affinity": -0.20
            },
              "B": {
                    "Hfg_298_15K": 565,
                    "Hfg_0K": 561.5,
                    "Entropy_298_15K": 5.9,
                    "Integrated_Heat_Capacity_0_to_298_15K": 11.1,
                    "Heat_Capacity_298_15K": 11.1,
                    "전자_에너지_수준": [38144, 38178],
                    "이온화_에너지": 8.30,
                    "전자 친화도": 0.28
                },
                 "C": {
                    "Hfg_298_15K": 716.7,
                    "Hfg_0K": 711.2,
                    "Entropy_298_15K": 5.7,
                    "Integrated_Heat_Capacity_0_to_298_15K": 8.5,
                    "Heat_Capacity_298_15K": 8.5,
                    "전자_에너지_레벨": [10193, 21648],
                    "이온화_에너지": 11.3,
                    "전자 친화도": 1.26
                },
                   "N": {
                    "Hfg_298_15K": 472.7,
                    "Hfg_0K": 472.7,
                    "Entropy_298_15K": 153.3,
                    "Integrated_Heat_Capacity_0_to_298_15K": 29.1,
                    "Heat_Capacity_298_15K": 29.1,
                    "전자_에너지_수준": [19233, 28838],
                    "이온화_에너지": 14.5,
                    "Electron_Affinity": -0.07
                 },
                  "오": {
                    "Hfg_298_15K": 249.2,
                    "Hfg_0K": 246.7,
                    "Entropy_298_15K": 161.1,
                    "Integrated_Heat_Capacity_0_to_298_15K": 29.4,
                    "Heat_Capacity_298_15K": 29.4,
                    "전자_에너지_레벨": [15867, 22698],
                    "이온화_에너지": 13.6,
                    "전자 친화도": 1.46
                  },
                  "F": {
                    "Hfg_298_15K": 79.4,
                     "Hfg_0K": 77.2,
                    "Entropy_298_15K": 158.8,
                    "Integrated_Heat_Capacity_0_to_298_15K": 30.2,
                     "Heat_Capacity_298_15K": 30.2,
                     "전자_에너지_레벨": [404, 40889],
                    "이온화_에너지": 17.4,
                     "전자 친화력": 3.40
                 },
                  "네": {
                      "Hfg_298_15K": 0,
                      "Hfg_0K": 0,
                      "Entropy_298_15K": 146.3,
                      "Integrated_Heat_Capacity_0_to_298_15K": 20.8,
                      "Heat_Capacity_298_15K": 20.8,
                       "전자_에너지_레벨": [134041, 136541, 138892],
                      "이온화_에너지": 21.6,
                      "전자 친화도": -0.08
                  },
                "나":{
                    "Hfg_298_15K": 107.3,
                     "Hfg_0K": 107.7,
                    "Entropy_298_15K": 153.7,
                    "Integrated_Heat_Capacity_0_to_298_15K": 44.4,
                     "Heat_Capacity_298_15K": 44.4,
                     "전자_에너지_레벨": [16956, 17293],
                     "이온화_에너지": 5.14,
                    "전자 친화도": 0.54
                },
              "마그네슘":{
                "Hfg_298_15K": 147.7,
                "Hfg_0K": 146.2,
                "Entropy_298_15K": 32.7,
                "Integrated_Heat_Capacity_0_to_298_15K": 24.9,
                "Heat_Capacity_298_15K": 24.9,
                 "전자_에너지_레벨": [24581, 30994],
                "이온화_에너지": 7.65,
                "전자 친화력": -0.30
            },
            "알":{
                "Hfg_298_15K": 324.3,
                 "Hfg_0K": 324.1,
                "Entropy_298_15K": 28.3,
                 "Integrated_Heat_Capacity_0_to_298_15K": 24.4,
                  "Heat_Capacity_298_15K": 24.4,
                  "전자_에너지_레벨": [25057, 33951],
                 "이온화_에너지": 5.99,
                  "전자 친화도": 0.43
              },
              "시":{
                "Hfg_298_15K": 450.0,
                "Hfg_0K": 447.6,
                "Entropy_298_15K": 18.8,
                "Integrated_Heat_Capacity_0_to_298_15K": 20.2,
                 "Heat_Capacity_298_15K": 20.2,
                "전자_에너지_레벨": [6209, 14300],
                 "이온화_에너지": 8.15,
                 "전자 친화도": 1.39
               },
                "피":{
                    "Hfg_298_15K": 314.6,
                    "Hfg_0K": 314.6,
                    "Entropy_298_15K": 163.2,
                    "Integrated_Heat_Capacity_0_to_298_15K": 27.3,
                     "Heat_Capacity_298_15K": 27.3,
                      "전자_에너지_레벨": [11828, 19553],
                     "이온화_에너지": 10.5,
                      "전자 친화력": 0.75
                  },
                "에스":{
                     "Hfg_298_15K": 278.3,
                     "Hfg_0K": 275.2,
                     "Entropy_298_15K": 167.7,
                    "Integrated_Heat_Capacity_0_to_298_15K": 29.2,
                     "Heat_Capacity_298_15K": 29.2,
                     "전자_에너지_레벨": [21394, 29394],
                     "이온화_에너지": 10.4,
                      "전자 친화도": 2.08
                  },
                  "Cl":{
                     "Hfg_298_15K": 121.3,
                     "Hfg_0K": 119.1,
                     "Entropy_298_15K": 165.2,
                     "Integrated_Heat_Capacity_0_to_298_15K": 33.3,
                     "Heat_Capacity_298_15K": 33.3,
                       "전자_에너지_레벨": [882, 8823],
                      "이온화_에너지": 13.0,
                       "전자 친화도": 3.62
                  },
                 "아르": {
                      "Hfg_298_15K": 0,
                      "Hfg_0K": 0,
                     "Entropy_298_15K": 154.8,
                      "Integrated_Heat_Capacity_0_to_298_15K": 20.8,
                      "Heat_Capacity_298_15K": 20.8,
                     "전자_에너지_레벨": [93144, 93751, 95282],
                     "이온화_에너지": 15.8,
                      "전자 친화도": -0.08
                  },
                  "케이":{
                    "Hfg_298_15K": 89.2,
                     "Hfg_0K": 89.2,
                      "Entropy_298_15K": 160.3,
                       "Integrated_Heat_Capacity_0_to_298_15K": 46.2,
                      "Heat_Capacity_298_15K": 46.2,
                     "전자_에너지_레벨": [12985, 13042],
                      "이온화_에너지": 4.34,
                     "전자 친화도": 0.50
                   },
                  "캘리포니아":{
                      "Hfg_298_15K": 178.2,
                       "Hfg_0K": 177.3,
                       "Entropy_298_15K": 41.6,
                      "Integrated_Heat_Capacity_0_to_298_15K": 25.9,
                      "Heat_Capacity_298_15K": 25.9,
                      "전자_에너지_레벨": [15315, 23652],
                     "이온화_에너지": 6.11,
                       "Electron_Affinity": -0.02
                  },
                  "Sc":{
                      "Hfg_298_15K": 0,
                       "Hfg_0K": 0,
                       "Entropy_298_15K": 33.2,
                      "Integrated_Heat_Capacity_0_to_298_15K": 3.80,
                      "Heat_Capacity_298_15K": 25.52,
                      "전자_에너지_레벨": [0, 11519.99],
                     "이온화_에너지": 6.561,
                       "전자 친화도": 0.189
                  },
                  "티":{
                      "Hfg_298_15K": 473.00,
                       "Hfg_0K": 470.00 ,
                       "Entropy_298_15K": 180.30,
                      "Integrated_Heat_Capacity_0_to_298_15K": 7.54,
                      "Heat_Capacity_298_15K": 24.43,
                      "전자_에너지_레벨": [0, 170.132, 386.874, 6556.833, 6598.765, 6661.006, 6742.756, 6842.962, 7255.355, 8436.618, 8492.421, 8602.34],
                     "이온화_에너지": 6.828,
                       "전자 친화력": 0.087
                  },
                  "티":{
                      "Hfg_298_15K": 473.00,
                       "Hfg_0K": 470.00 ,
                       "Entropy_298_15K": 180.30,
                      "Integrated_Heat_Capacity_0_to_298_15K": 7.54,
                      "Heat_Capacity_298_15K": 24.43,
                      "전자_에너지_레벨": [0, 170.132, 386.874, 6556.833, 6598.765, 6661.006, 6742.756, 6842.962, 7255.355, 8436.618, 8492.421, 8602.34],
                     "이온화_에너지": 6.828,
                       "전자 친화력": 0.087
                  },
        };


        계산Btn.addEventListener('클릭', function() {
            let selectedElement = elementInput.value.trim();
            if (!selectedElement) {
                Alert('요소 기호를 입력하세요.');
                반품;
            }let NormalizedElement = selectedElement.charAt(0).toUpperCase() selectedElement.slice(1).toLowerCase();
            CalculatorOutput.innerHTML = '<div>



<p>동적으로 목차를 생성하는 로직, 각 요소의 값을 계산하는 로직과 함께 계산기에 많은 콘텐츠를 추가했습니다. Noah는 요소와 공유 반지름 및 결합 길이에 대한 기본 계산기를 통합할 수 있는지 물었습니다. 이제 페이지가 준비되었습니다! 보고 싶으시면 여기 있어요:<br>
요소의 주기성 - 참고</p>

<p>오늘의 코딩은 이걸로 끝입니다. 나도 알아요, 조금 서두르는 느낌이 들거든요. 왜냐하면 그렇거든요. 나는 그 일의 대부분도 기억하지 못하기 때문에 내가 한 모든 일과 이유를 정확하게 설명할 수 없었습니다. 기본적인 변경사항만 기억나네요.</p>


          

            
  

            
        
로그인 후 복사

위 내용은 나는 처음부터 ULTIMATE 교육 웹사이트를 구축했습니다 — 3일차의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

<gum> : Bubble Gum Simulator Infinity- 로얄 키를 얻고 사용하는 방법
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
Nordhold : Fusion System, 설명
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
Mandragora : 마녀 트리의 속삭임 - Grappling Hook 잠금 해제 방법
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

Python vs. JavaScript : 학습 곡선 및 사용 편의성 Python vs. JavaScript : 학습 곡선 및 사용 편의성 Apr 16, 2025 am 12:12 AM

Python은 부드러운 학습 곡선과 간결한 구문으로 초보자에게 더 적합합니다. JavaScript는 가파른 학습 곡선과 유연한 구문으로 프론트 엔드 개발에 적합합니다. 1. Python Syntax는 직관적이며 데이터 과학 및 백엔드 개발에 적합합니다. 2. JavaScript는 유연하며 프론트 엔드 및 서버 측 프로그래밍에서 널리 사용됩니다.

JavaScript 및 웹 : 핵심 기능 및 사용 사례 JavaScript 및 웹 : 핵심 기능 및 사용 사례 Apr 18, 2025 am 12:19 AM

웹 개발에서 JavaScript의 주요 용도에는 클라이언트 상호 작용, 양식 검증 및 비동기 통신이 포함됩니다. 1) DOM 운영을 통한 동적 컨텐츠 업데이트 및 사용자 상호 작용; 2) 사용자가 사용자 경험을 향상시키기 위해 데이터를 제출하기 전에 클라이언트 확인이 수행됩니다. 3) 서버와의 진실한 통신은 Ajax 기술을 통해 달성됩니다.

자바 스크립트 행동 : 실제 예제 및 프로젝트 자바 스크립트 행동 : 실제 예제 및 프로젝트 Apr 19, 2025 am 12:13 AM

실제 세계에서 JavaScript의 응용 프로그램에는 프론트 엔드 및 백엔드 개발이 포함됩니다. 1) DOM 운영 및 이벤트 처리와 관련된 TODO 목록 응용 프로그램을 구축하여 프론트 엔드 애플리케이션을 표시합니다. 2) Node.js를 통해 RESTFULAPI를 구축하고 Express를 통해 백엔드 응용 프로그램을 시연하십시오.

JavaScript 엔진 이해 : 구현 세부 사항 JavaScript 엔진 이해 : 구현 세부 사항 Apr 17, 2025 am 12:05 AM

보다 효율적인 코드를 작성하고 성능 병목 현상 및 최적화 전략을 이해하는 데 도움이되기 때문에 JavaScript 엔진이 내부적으로 작동하는 방식을 이해하는 것은 개발자에게 중요합니다. 1) 엔진의 워크 플로에는 구문 분석, 컴파일 및 실행; 2) 실행 프로세스 중에 엔진은 인라인 캐시 및 숨겨진 클래스와 같은 동적 최적화를 수행합니다. 3) 모범 사례에는 글로벌 변수를 피하고 루프 최적화, Const 및 Lets 사용 및 과도한 폐쇄 사용을 피하는 것이 포함됩니다.

Python vs. JavaScript : 커뮤니티, 라이브러리 및 리소스 Python vs. JavaScript : 커뮤니티, 라이브러리 및 리소스 Apr 15, 2025 am 12:16 AM

Python과 JavaScript는 커뮤니티, 라이브러리 및 리소스 측면에서 고유 한 장점과 단점이 있습니다. 1) Python 커뮤니티는 친절하고 초보자에게 적합하지만 프론트 엔드 개발 리소스는 JavaScript만큼 풍부하지 않습니다. 2) Python은 데이터 과학 및 기계 학습 라이브러리에서 강력하며 JavaScript는 프론트 엔드 개발 라이브러리 및 프레임 워크에서 더 좋습니다. 3) 둘 다 풍부한 학습 리소스를 가지고 있지만 Python은 공식 문서로 시작하는 데 적합하지만 JavaScript는 MDNWebDocs에서 더 좋습니다. 선택은 프로젝트 요구와 개인적인 이익을 기반으로해야합니다.

Python vs. JavaScript : 개발 환경 및 도구 Python vs. JavaScript : 개발 환경 및 도구 Apr 26, 2025 am 12:09 AM

개발 환경에서 Python과 JavaScript의 선택이 모두 중요합니다. 1) Python의 개발 환경에는 Pycharm, Jupyternotebook 및 Anaconda가 포함되어 있으며 데이터 과학 및 빠른 프로토 타이핑에 적합합니다. 2) JavaScript의 개발 환경에는 Node.js, VScode 및 Webpack이 포함되어 있으며 프론트 엔드 및 백엔드 개발에 적합합니다. 프로젝트 요구에 따라 올바른 도구를 선택하면 개발 효율성과 프로젝트 성공률이 향상 될 수 있습니다.

JavaScript 통역사 및 컴파일러에서 C/C의 역할 JavaScript 통역사 및 컴파일러에서 C/C의 역할 Apr 20, 2025 am 12:01 AM

C와 C는 주로 통역사와 JIT 컴파일러를 구현하는 데 사용되는 JavaScript 엔진에서 중요한 역할을합니다. 1) C는 JavaScript 소스 코드를 구문 분석하고 추상 구문 트리를 생성하는 데 사용됩니다. 2) C는 바이트 코드 생성 및 실행을 담당합니다. 3) C는 JIT 컴파일러를 구현하고 런타임에 핫스팟 코드를 최적화하고 컴파일하며 JavaScript의 실행 효율을 크게 향상시킵니다.

Python vs. JavaScript : 사용 사례 및 응용 프로그램 비교 Python vs. JavaScript : 사용 사례 및 응용 프로그램 비교 Apr 21, 2025 am 12:01 AM

Python은 데이터 과학 및 자동화에 더 적합한 반면 JavaScript는 프론트 엔드 및 풀 스택 개발에 더 적합합니다. 1. Python은 데이터 처리 및 모델링을 위해 Numpy 및 Pandas와 같은 라이브러리를 사용하여 데이터 과학 및 기계 학습에서 잘 수행됩니다. 2. 파이썬은 간결하고 자동화 및 스크립팅이 효율적입니다. 3. JavaScript는 프론트 엔드 개발에 없어서는 안될 것이며 동적 웹 페이지 및 단일 페이지 응용 프로그램을 구축하는 데 사용됩니다. 4. JavaScript는 Node.js를 통해 백엔드 개발에 역할을하며 전체 스택 개발을 지원합니다.

See all articles