產品介紹
深灰主色產品形象頁:毛玻璃主視覺卡、六張特色卡、FAQ 手風琴、行動呼籲橫幅與兩張簡介卡。
概要
即時預覽
在新分頁開啟範例
頁面區塊
互動行為
- js/index.js:body.onscroll 超過 48px 時以 PDRenderKit 字串擴充("nav-002".$.class / class)切換 #nav-002 的 .scroll
- js/index.js:將自訂屬性 top / bottom / bg-col / col / bg-img 轉為 inline padding、背景色、文字色、背景圖(-- 開頭值轉為 var(--x))
- js/index.js:把 span[mask=arc|arc-up|arc-down|slash-left|slash-right|wave] 替換成依 viewport 寬度產生的 inline SVG 分隔曲線(>1024px 時 64/128px)
- inline script showContent(this):手風琴,點按鈕切換所屬 li 的 .show 並關閉其他已展開項目
- js/index.js 包在 DOMContentLoaded 內,依賴 PDRenderKit 原型擴充($all、$attr、_style、$style、$parent、class、class)
相依資源
樣式
共用區塊庫:index.scss 在 body 內 import 全部 nav/header/section/footer partial,以屬性選擇器(nav[num]、section[header=N]、section[num=N]、footer[num])對應;comp/* 為在 section 內 import 的片段(r2/r3/r4 響應式欄寬、div-info 標題區)。component/_info.scss、comp/_w-h-rate.scss、section/_rm-1st-top.scss 存在但未被 import。本份 header/_002.scss 與 section/_015-center.scss 與 20230302 不同。image/full.svg、half.svg、joball.jpg 存在但未被引用。
cd target/20230313
npx sass sass/index.scss css/index.css --no-source-map || exit 1
使用技巧
- inline <style> :root 以 CSS 變數設定主題(--col-nav、--col-system、--col-txt、--col-border、--max-width)
- 屬性驅動版型:section[num=N] / section[header=N] / nav[num] 對應預製 SCSS 區塊;ul.r2/.r3/.r4 選 2/3/4 欄卡片
- 固定頂部導覽列與漢堡按鈕;media query 斷點 max-width 413/479/639/799/1023/1139px、min-width 480/640/768/1024px
- 以 span[mask] 由 JS 產生 SVG 區塊分隔(弧形 / 斜切 / 波浪)
- SEO head:Open Graph、Twitter card、canonical、JSON-LD WebPage schema
- 毛玻璃主視覺:header/_002.scss 使用 rgba(255,255,255,0.75)+backdrop-filter: blur(5px)
- header/_002.scss 使用多行截斷(-webkit-line-clamp: 3)
外部資源
相關頁面