测试代码块行号显示

Y
小 明
|
|
24 次阅读
测试代码块行号显示
测试代码块行号显示

测试代码块行号显示

这是一个测试文章,用于验证代码块行号是否正常显示。

Python代码示例

PYTHON
# 这是一个Python代码示例
def hello_world():
    print("Hello, World!")

    # 循环示例
    for i in range(5):
        print(f"数字: {i}")

hello_world()

JavaScript代码示例

JAVASCRIPT
// 这是一个JavaScript代码示例
function greet(name) {
    console.log(`Hello, ${name}!`);

    // 数组操作
    const numbers = [1, 2, 3, 4, 5];
    const doubled = numbers.map(x => x * 2);
    console.log(doubled);
}

greet("World");

CSS代码示例

CSS
/* 这是一个CSS代码示例 */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
}

.box {
    width: 200px;
    height: 200px;
    background-color: #4f46e5;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

测试完成!请访问文章详情页面查看代码块行号显示效果。

评论 (0)

登录后才能发表评论

登录发表评论