掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 790|回复: 3

[求助] 請賜教 css & html

[复制链接]
  • TA的每日心情
    开心
    2018-8-8 03:13
  • 签到天数: 1 天

    [LV.1]初来乍到

    发表于 2021-1-22 20:43:42 | 显示全部楼层 |阅读模式
    本帖最后由 喬治兄 于 2021-1-22 23:33 编辑 * q* }0 K- X% B- V9 k4 S
    $ B6 t0 r6 O% a; p% ~3 E
    請賜教 css & html
    2 p" z) O: d7 N7 H  K1 U, j" L, B4 J1 P6 c4 m" d/ a# y
    https://www.w3schools.com/code/tryit.asp?filename=GIH4P74ZQBJ7
    / ^" z3 `! h2 \0 Q3 T
    8 m' F3 i: K1 t9 J1 t6 q請賜教想要當按兩邊的 zone 1~zone 8 區域時是否能再返回到最上面的導航那列3 S1 s, p  p1 a' l& w4 b

    ; x, Q0 b! p: z* P/ H1 ?1 [ <a href="#1">zone 1</a> , <a href="#2">zone 2</a> , <a href="#3">zone 3</a> , <a href="#4">zone 4</a> ,
    , b0 G" g2 D) I7 `2 B: |! @! X<a href="#5">zone 5</a> , <a href="#6">zone 6</a> , <a href="#7">zone 7</a> , <a href="#8">zone 8</a>
    + l4 e4 w) [+ U- }..........這個區域且配合 hightlight & O3 P6 P7 y; ?5 c+ q
    9 Y# c- w- d, [6 o
    Thanks a lot& o! r: L- H8 C. n( d. X+ J" \

    ' {( W' S7 Y5 K8 N. o8 b) O9 e. K* y
    + J, t2 |8 L# |8 [
    ' w) L/ q7 F, ~8 {7 {
    / b4 \" W" e6 }( m5 E0 }
    <!DOCTYPE html>
    4 n3 q7 U4 J2 r3 U<html>
    ' L' g& j1 ^- A8 d0 f<head>
    / i1 l' r9 X6 p+ A9 U- k7 a7 l<style> 3 @& N- w* p0 S0 q& M/ P/ H8 k
    #main {
    + e" y- v  \9 u* B# g4 v  width: max-width;
    7 T" C, Y6 t# o3 {+ `  height: 100vw;* P: t/ ^! S. p/ W, H
      border: 1px solid #c3c3c3;
    ' ?9 \$ G# O, G" S8 p  display: flex;
    6 q2 \0 R% ^1 k% j  flex-wrap: nowrap;7 h6 p+ M) ]7 O! e  I
      - ~, M8 \4 ^  j( F- g9 o
    }8 c$ V# V- Y; r! g& M7 y, Z
    & G5 j# V. w9 I
    #main div {/ a% B( f4 l+ w2 k2 h' \' C
      center
    " M& N8 U& _4 r2 r  height: 100vw;
    , s: W7 @; d- w/ [  text-align: center;9 @* E1 t" n; F' U6 S
      flex-grow: 1;; o' a1 E- V# ?: `4 j  `
      flex-shrink: 1;/ L4 M" k. k& ]( C
    }
    ! J9 f# ?. d7 X& y  M& n! |9 b.flex-container {
    : B9 R9 c( O6 L  display: -webkit-flex;( H! T. y9 P; t; w
      display: flex;4 f; x/ y7 K4 L# J8 M
      -webkit-flex-direction: column;& x$ U6 p5 b4 I% A8 }- M/ A
      flex-direction: column;
    4 }! z' Y2 N% [6 ~- H3 g" y  width:  max-width;9 M8 R0 w% f5 s+ {
      height: 100vw;
    ( l6 Q$ }. {7 f1 s% ~/ b  background-color: lightgrey;
    , C* P) b+ t. [6 N; H  2 T6 t( O+ B0 o: J! ~/ M
    }
    ( g+ _) F3 _( Z* E/ U0 L. c, c# p* f7 G, r
    .flex-item {( w% Q/ W" A0 e& n& N' e
      width: 1.5vw;
    7 w% O/ R0 \5 {3 j6 a5 ~! M  height: 25vw;4 F3 p+ @* g& H& i
      text-align: center;
    9 T, }. T" G8 Q6 t: R. ?  line-height: 25vw;* W& O' [3 _1 {; ]0 i2 N8 D: x
      font-size: 1.5vw;6 m" w; R; @/ p
      background-color: white;
    3 A2 u: [! u& p/ S' d8 B, I9 ?4 F, E  }3 u; u$ L! N; i1 o* Z1 ]9 c6 C
    , f% R9 D2 ^" `* M( L" }
    6 Y; g0 S" m: Z$ }& f
    :target {
    5 b, ^( y0 C5 y5 W  border: .5px solid #D4D4D4;
    : B( P% `/ r! ^! b, h4 Z: q* j" x  border-color: black;/ |8 B- W4 i. x/ k. p
      background-color: yellow;0 `6 G4 Y9 p' z: @# B8 M. u
    }
    ! i2 L( ~( o/ W% F; Q/ M</style>
    / `/ B( H3 u7 z/ i8 a; K" O</head>
    5 P3 O- n1 R- I& A7 n<body>
    % a" }/ v0 ]" m) t) ~5 o) f<a href="#1">zone 1</a> , <a href="#2">zone 2</a> , <a href="#3">zone 3</a> , <a href="#4">zone 4</a> ,   l5 z! Q; u* B
    <a href="#5">zone 5</a> , <a href="#6">zone 6</a> , <a href="#7">zone 7</a> , <a href="#8">zone 8</a>4 J* |5 C) T9 P  l7 n# `( S
    <div id="main">, O1 s+ p* _9 y6 R' c- F1 y& \9 K7 n
      <div style="background-color:lightgrey;width:1.5w;"><div class="flex-container">
    4 g/ P! Q6 \( f/ x) I  <div id="1" class="flex-item">1</div>
    # ^' n! M) @6 k  <div id="2" class="flex-item">2</div>
    + ]5 B1 r/ `1 x1 I- B  <div id="3" class="flex-item">3</div>/ T1 ^- U" g, M' d' p
      <div id="4" class="flex-item">4</div>) r7 y; K- H6 o/ |
    </div></div>, Q: C$ U, x3 b4 z3 u
      <div style="background-color:lightblue;width:93vw;">B</div>
    3 l8 |1 d; U* G% S* ?2 j  <div style="background-color:lightgrey;width:1.5vw;"><div class="flex-container">) ^( n5 `" ^. {& m$ a9 u
      <div id="5" class="flex-item">5</div>
    7 ^6 ~3 F/ T- i( p8 Z. j8 N  <div id="6" class="flex-item">6</div>
    ! s- R# N1 _' i  V8 d/ |; S. S. g  <div id="7" class="flex-item">7</div>
    / T- s6 h0 {4 ^  q7 K  <div id="8" class="flex-item">8</div>& }7 b# M4 H) E0 t1 j# w8 A
    </div></div>. v* M* Y: N3 @
    </div>) c6 k3 a. O/ @1 ]/ ?$ n2 F

    8 v! P* R, T0 T6 c' `. P# Y: k# ~
    ) H0 C2 N4 U: A% i$ m  u. B7 i0 `9 k</body>  a& D' d  w0 Z' Q" `5 m- g0 Q
    </html>
    % f* {" }! |0 |- I! ^5 o) J
  • TA的每日心情
    开心
    2019-8-21 19:27
  • 签到天数: 5 天

    [LV.2]偶尔看看I

    发表于 2021-1-23 11:38:34 | 显示全部楼层
    嘿嘿,乔治兄这个想法不错
  • TA的每日心情
    开心
    2018-8-8 03:13
  • 签到天数: 1 天

    [LV.1]初来乍到

     楼主| 发表于 2021-1-23 11:47:14 | 显示全部楼层
    Mandolin 发表于 2021-1-23 11:38! v2 q$ ]4 e0 j" m1 t! B
    嘿嘿,乔治兄这个想法不错

    ) M  [. m% ?& H, ?1 l& O) R1 u" S4 J2 AMandolin 兄,可有點擊兩邊時能返回最上面的方法.....找了很久沒,不知有何方法可以處理
  • TA的每日心情
    开心
    2019-8-21 19:27
  • 签到天数: 5 天

    [LV.2]偶尔看看I

    发表于 2021-1-24 20:40:08 | 显示全部楼层
    喬治兄 发表于 2021-1-23 11:47' a' i- P; u0 ]5 k) @
    Mandolin 兄,可有點擊兩邊時能返回最上面的方法.....找了很久沒,不知有何方法可以處理 ...
    , @: p& q( b$ n7 g1 ?6 Z: d- v9 O
    我也不是很懂。不知加个锚点能行不:
    ! G8 w- i* Z& ^& b+ x* h5 S# P/ \+ [! K0 S2 g2 @* @
    顶部(紧接<body>后)加代码【<a name="top"></a>】,每个 zone 区内(即标签<div id="...></div>内)加【<a href="entry://#top">back top</a>】
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

    小黑屋|手机版|Archiver|PDAWIKI |网站地图

    GMT+8, 2025-4-28 18:25 , Processed in 0.020765 second(s), 21 queries .

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表