CSS background-attachment 示例

CSS background-attachment1 个文件更新于 2026-04-06
html公开前 25 行,完整代码需登录
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>CSS background-attachment 示例</title>
  <style>
    body {
      margin: 0;
      padding: 0;
      font-family: sans-serif;
    }
    .demo-section {
      margin-bottom: 40px;
    }
    .section-title {
      text-align: center;
      font-size: 24px;
      font-weight: bold;
      color: #333;
      margin: 30px 0 20px;
      padding: 10px;
      background: #f5f5f5;
    }
    .attachment-box {
      height: 400px;

登录后可以查看完整源码、在线编辑并实时预览运行效果。