WEBå¶ä½ã§å¿ ãã¨è¨ã£ã¦ããã»ã©ç»å ´ãããã®ã®ï¼ã¤ã«ãè¦åºãããããã¾ãã
ããã§ä»åã¯ãCSSã ãã§ä½ããã¦ããè¦åºãã®ä¸ã§ããå®ç¨æ§ãé«ããã®ãCSSã®ææ°è¦ç´ ã使ã£ããã®ãå³é¸ãã¦ãç´¹ä»ãã¾ããã³ããã§ç°¡åã«å®è£ ã§ããã®ã§ãæ¯é使ã£ã¦ã¿ã¦ãã ããã
飾ãä»ãã®è¦åºã
æ¬ä¼¼è¦ç´ beforeãafterã使ã£ã¦é£¾ããã¤ããè¦åºãã§ããbeforeã¨afterã®contentããããã£ãå¤æ´ããã°ãâãâ¡ã«ãããã¨ãã§ãã¾ãã
åããbeforeãafterã使ããã¿ã¼ã³ã§ããtransformããããã£ã§æãã«ããé·æ¹å½¢ã¨é·æ¹å½¢ãéãããã¨ã§ä¸è§å½¢ãä½ã£ã¦ãã¾ãã
beforeã¨afterã使ã£ãã·ã³ãã«ãªè¦åºãã§ãããã¼ãã¼ãæå®ããæ¬ä¼¼è¦ç´ ã®ä½ç½®ãpositionããããã£ã§æå®ãã¦ãã¾ãã
ãã¼ãã¼ãããè¦åºã
ãã£ãã·ã§ã³ä»ãã®è¦åºãã§ããã·ã³ãã«ãªã®ã§ä½¿ããããã§ãããã¬ã¹ãã³ã·ãã«å¯¾å¿ãããã®ã¯ããé¢åããã§ãã
è§ä¸¸ã«ããã ãã®ã·ã³ãã«ãªè¦åºãã§ãã
ãããããªãã³ã®ãããªè¦åºããã¿ã¼ã³ã§ããtransformã§æãã«ããbeforeãafterãçµã¿åããããã¨ã§ãªãã³ã®ãããªå½¢ç¶ã«ãã¦ãã¾ãã
æåãããé¨åã ãè²ãã¤ãã¦ããã·ã³ãã«ã§æ±ç¨æ§ãé«ããã¼ãã¼ã§ããbeforeã¨afterããã¾ã使ã£ã¦ãã¾ãã
ãããã·ã³ãã«ãªãã¼ãã¼ã®è¦åºãã§ããè¦åºãã«ã¯ä¸ä¸ã®ãã¼ãã¼ã ãæå®ããbeforeã«å·¦å³ã®è¦åºããæå®ãã¾ãã
å°ãå¤ãã£ãè¦åºã
ãã¼ãã¼ãè¤æ°ããå°è±¡çãªè¦åºãã§ãããã使ãã©ããã¯éããã¦ããã¨æãã¾ãã
ãã£ãã·ã§ã³ã¨ã¿ã¤ãã«ãã»ããã«ãªã£ãè¦åºãã§ããä¾ã§ã¯ãã£ãã·ã§ã³ã¨ã¿ã¤ãã«ã«ãã¦ãã¾ããã使ãæ¹ã«ãã£ã¦ã¯å¿ç¨ããããããªãã¶ã¤ã³ã§ãã
ã·ã³ãã«ãªç½æãæåã®è¦åºãã«ãæãã®ç·ã追å ãã¦ãã¾ããbeforeãafterãå¤æ´ããã°ãã»ãã®ãã¶ã¤ã³ã«å¿ç¨ãããã¨ãã§ãã¾ãã
svgè¦ç´ ã¨textè¦ç´ ã使ã£ãè¦åºãã§ããsvgè¦ç´ ã使ãã¨è¦åºãã®è¡¨ç¾ãããªãåºããã®ã§ãã¢ãã³ãã©ã¦ã¶ã®ã¿ã対象ããã¨å ´åã¯å°å ¥ãæ¤è¨ãã¦ãè¯ãããããã¾ããã
ä¸è¦æ®éã®è¦åºãã§ãããCSSã®counter()ã使ãèªåã§çªå·ãæ¯ã£ã¦ãã¾ããJavaScriptã使ãå¿ è¦ããªããç°¡åã«æ¸ããã®ãè¯ãã§ãã
CSSã ãã§ã¤ãããã¼ãã¼èæ¯ã®è¦åºãã§ããlinear-gradient()ã§ãå¯è½ã§ãããrepeating-linear-gradient()ã使ãã¨ããç°¡åã«è¨è¿°ã§ãã¾ãã
ã¾ã¨ã
ä»åã¯ãå®ç¨æ§ãé«ããã®ãCSSã®æ°ããè¦ç´ ã使ã£ãè¦åºããç´¹ä»ãã¾ãããCSSã«ã¯æ°ããè¦ç´ ã次ã ã«è¿½å ããã¦ããã®ã§ãCSSã ãã§å®è£ ã§ãããã¶ã¤ã³ã®å¹ ãããã«å¢ãã¦ããããã§ãã
ä»åç´¹ä»ããè¦åºãä¸è¦§