- ããã°ã®ä»çµã¿
- ãã¯ã¦ãªããã°ãã®CSSã«ã¤ãã¦
- ãã¾ãï¼å¹ãåºã表示ã«ã¤ãã¦ï¼
- æå¾ã«
Webã®ããã³ãå¨ãã¯ãå°ã è¤éã§ããããã¨æãã¨è²ããªãã¨ãåºæ¥ã¾ãã
ããã¯ãæ®éã®ã¢ããªã±ã¼ã·ã§ã³ã¨ã¯ä»çµã¿ãç°ãªãããã§ããï¼ç¾å¨ã®ãã¹ã¯ãããçã®ã¢ããªã±ã¼ã·ã§ã³ã®ç»é¢éçºããWebç³»ã®æµããæ±²ãã§ããã«å調ãããã¨ãã¦ãã¾ããï¼
ç§èªèº«ããWebç³»ã®åºèº«ã§ã¯ãªãã®ã§ããã¾ãè¸ã¿è¾¼ãã§è§£èª¬ã¯åºæ¥ã¾ããããã ãããããããæãã ã¨ãããã¨ã解説ãã¦ã¿ã¾ããã
ããã°ã®ä»çµã¿
ã¾ãã大ã¾ããªããã°ã§ã®ç»é¢è¡¨ç¤ºã«ã¤ãã¦å³å¼ãã¾ãããã
ã ãããã¯ãããªæãã§ãã
çããã®ãã½ã³ã³ããWebãµã¼ãã¨å¼ã°ããéä¿¡ãåãä»ããã³ã³ãã¥ã¼ã¿ã«ã¢ã¯ã»ã¹ãã¾ããï¼ãã®ãMilkã®ã¡ã¢å¸³ãã®å ´åã¯ããã¯ã¦ãªãã®Webãµã¼ããå©ç¨ãã¦ãã¾ããï¼
Webãµã¼ãã¯ãåã ã®ãã½ã³ã³ãã©ã®Webãã¼ã¸ãè¦ããã®ããå¤æããHTMLã¨å¼ã°ãããã¡ã¤ã«ãè¿ä¿¡ãã¾ãã
ãã®æãCSSãã¡ã¤ã«ãåã³JavaScriptãã¡ã¤ã«çãé¢ä¿ãããã¨ãåããã°ããããåãè¾¼ãã å½¢ã§HTMLãçæãã¦è¿ä¿¡ãã¾ãã
HTML
Webç»é¢ã®åºæ¬ã¯HTMLã¨å¼ã°ãããã¼ã¯ã¢ããè¨èªã§æ§æããã¾ãã
ãã®ç»åã®ä¾ã¯ãããã¾ã§çããã®PCã«è¿ä¿¡ããããæçµçãªå½¢ã®HTMLã§ãã
ãã¦ããã¼ã¯ã¢ããè¨èªã¨ãããå°ã é£ããååãåºã¦ãã¾ããã
æ®éã®ããã¹ãã®æã§ããåããã¦ãè¯ãã®ã§ãããããã§ã¯ãã¾ãã«ç°¡ç´ ã§ãã
ä¾ãã°ãç« ã®ååã¨æ¬æã¯å¥ã ã«ãã¦æ±ã£ãã»ããããã§ããããã¾ããæ¦è¦ã¨æ¬æã¯æç« ã®æå³ãå°ãç°ãªãã¾ãã
ã¨è¨ãããã«ãããã¹ãã§æ¸ãããæå ¨ä½ã®ä¸ã§ããæå³ã§è¦ãã¨ã°ã«ã¼ãã³ã°åºæ¥ããã¨ãçºè¦ãã¾ããã
ã¾ããã°ã«ã¼ãã³ã°ããã¨ãããã°ã©ã ã§æ¤ç´¢ããã¨ãã«æ¢ããããã¨ããã¡ãªãããããã¾ããï¼å ¨æãæ¤ç´¢ããªãã¦è¯ããã¤ã¾ãã¿ã¼ã²ãããçµããã¨ãã§ããæéãç¯ç´ã§ãããï¼
ããã§ãã¿ã°ã¨å¼ã°ãããã®ã§æãå²ããã¨ã§ãããã¹ãã«æå³ãæããããã¨è¨ãã®ãå§ã¾ãã§ããã
ãããHTMLã§ããããã¼ã¯ã¢ããè¨èªã®ä»£è¡¨ä¾ãªã®ã§ããï¼ãã®ããã«ã主ã«ã¿ã°ã使ã£ã¦ãæå³ã®ããããã¾ãã«ã°ã«ã¼ãã³ã°ããå½¢å¼ã§ãã¼ã¿ãæ±ããã®ããã¼ã¯ã¢ããè¨èªã¨å¼ã³ã¾ããHTMLããã«ã¼ã«ãå³æ ¼ãªXHTMLãä»ã«ããã¼ã¿å®ç¾©ã«ç¹åããXMLãç»é¢æ§æã«ç¹åããXAMLãªã©ãããã¾ããï¼
ãã®ã¿ã°ããã©ã¦ã¶ã¯è§£éãã¦ãåä½ãè¡ãã¾ãã
ä¾ãã°ãbrã¿ã°ã¨è¨ãã®ã¯ãæ¹è¡ãã¦ãã¨è¨ãæå³ã§ãããdivã¿ã°ã¨è¨ãã®ã¯ãç¹å¥ã«æå³ã¯æã£ã¦ãã¾ããããå²ã¾ãããã®ãã²ã¨ã¤ã®ããã¾ãã¨ãã¦ã¿ãªãã¨ããæå³ã§ãã
ä»ã«ããã¿ã°ã®è²ã ãªç¨®é¡ã¯å¢ãã¦ãããé³æ¥½ãåçããããæ åãåçããããªãã¦æå³ã®ã¿ã°ãå¢ãã¦ããã¾ãããã¾ãããã®ã¿ã°ã®è§£éãåãã©ã¦ã¶ã§ç°ãªãããã«ãç»é¢ã®è¡¨ç¤ºãç°ãªãã¨ãããã¨ãçºçããã®ã§ãã
ç¾å¨ã¯ãHTML5ã¨ããè¦æ ¼ã«çµ±ä¸ããã¨ãããã¨ã§å社ãããåãããè¡ã£ã¦ãã¾ãã
è£ é£¾ããããï¼CSSã¨JavaScriptï¼
ãã¦ãHTMLã ãã§ã¯ç°¡ç´ ãªããã¹ããã¡ã¤ã«ã«ãªã£ã¦ãã¾ãã¾ãã
ããã§ãã¿ã°ã®ä¸ã«è£ 飾ã®æå³ãæããããã¨ã«ãã¾ãããä¾ãã°ã太ç·ã«ãã¦ã¿ããããã©ã³ãã®å¤§ãããå¤ãã¦ã¿ãããè²ãä»ãããã»ã»ã»
ããã¯ãã¿ã°ã®ãå±æ§ãã¨å¼ã°ãã¦ãã¾ãã
åã¿ã°ã«å¯¾ãã¦ãåå¥ã«å±æ§ãæ¸ãè¾¼ããã¨ã§ããã®ã¿ã°ã§å²ã¾ããé¨åãè£ é£¾ãããã¨ãåºæ¥ã¾ãã
ããããªãããæ¯åº¦ã太ç·ããã©ã³ããè²ããã¡ãã¡æ¸ãã®ãé¢åã«ãªã£ã¦ãã¾ããã
ä¾ãã°ããè²ã¯èµ¤ã§ããã©ã³ãã¯20ptã§ã太ç·ãã¨è¨ãã®ããä½åº¦ã使ãããï¼ã¨æã£ãã¨ãã¾ãããã
åå¥ã®ã¿ã°ã«å¯¾ãã¦ãè²ã®å±æ§ããã©ã³ãã®å±æ§ãç·ã®å±æ§ãæ¸ãã®ã¯éå¹ççã§ãã
ã¨è¨ãããã§ãstyleã¿ã°ã¨ãããã®ãåºæ¥ã¾ããã
ãã®styleã¿ã°ã§ãå±æ§ãã¾ã¨ãã¦å®ç¾©ãã¦ãããã«ååãä»ãã¾ãã
ããã¨ãåã¿ã°ã®ä¸ã§ãã®ååãæ¸ãã°ãã©ã®styleãé©ç¨ãããã¨è¨ããã¨ãåããã¾ãã
ããã§ä½åº¦ãè£ é£¾ã«ã¤ãã¦æ¸ãå¿ è¦æ§ããªããªãã¾ããããã§ãããã§ããã»ã»ã»
ã¨ã¯è¡ããªãã£ãã®ã§ãã
çããã¯ã沢山è¨äºãæ¸ãã§ãããï¼ ãã®è¨äºã¯åå¥ã®HTMLã§ãã
åã ã®HTMLã«å¯¾ãã¦ãæ¯åº¦ãstyleã¿ã°ãå®ç¾©ãç´ãã®ã¯é¢åã§ãã
ããã§èããï¼
HTMLã®ä¸ãããstyleã¿ã°ã®é¨åãåé¢ãããï¼
ã¨è¨ãããã§ãçã¾ããã®ãCSSãã¡ã¤ã«ã§ãã
HTMLã®ä¸ã§ãé©ç¨ãããCSSãã¡ã¤ã«ãæ¸ãè¾¼ãã§ããã¾ããããã¨ãWebãµã¼ããHTMLãè¿ä¿¡ããéã«ãå¿ è¦ãªCSSãã¡ã¤ã«ãæ¢ãã ãã¦ããããåä½ããã¾ãã
çµæçã«ãçããã«ã¯ç¶ºéºã«è£ 飾ããããç¶æ ã®HTMLãè¿ä¿¡ãããã¨ããä»çµã¿ã§ãã
ç»é¢ä¸ã§åããåºãããæã«ã¯ãJavaScriptã¨ããè¨èªã使ãã®ãä¸è¬çã§ãã
ãããåæ§ã«ãHTMLã®ã¿ã°ã¨ãã¦ç´æ¥çã«æ¸ãè¾¼ããã¨ãå¯è½ã§ãããåãã¼ã¸ã«å¯¾ãã¦æ¸ãè¾¼ããã¨ã¯éå¹çãªã®ã§ãJavaScriptãã¡ã¤ã«ã¨ãã¦åé¢ãã¾ããããã¦ãHTMLã®ä¸ã§ããã®JavaScriptãã¡ã¤ã«ãå¼ã³åºãã¨ãããã¨ãæ¸ãã¾ãã
ããã«ãã£ã¦ãHTMLã¨CSSãã¾ãJSï¼JavaScriptï¼ã¨ããå½¢ã§ãã¡ã¤ã«ãå¥ã ã«ç®¡çããã¡ã³ããã³ã¹åºæ¥ãããã«ãªã£ãã®ã§ãã
ã§ãããã注æãã¦æ¬²ããã®ã¯ãæºæµã¨ãã¦ã¯HTMLãªã®ã§ãããããå¥åã«åãããã¨ãã§ããããåããªããã¨ãå¯è½ãªã®ã§ãã
ç¹ã«ããã¯ã¦ãªãã®å ´åã¯ãstyleã¿ã°ã®é¨åããCSSãã¨å¼ãã ãããï¼æ£ç¢ºã«ã¯styleã¿ã°ãªã®ã§CSSãã¡ã¤ã«ã¨ãã¦åé¢ããã¦ããããã§ã¯ãªããï¼å ´åãããã®ã§ãå°ã
誤解ãçã¾ããã®ããªï¼ã¨æãã¾ãã
ãã¯ã¦ãªããã°ãã®CSSã«ã¤ãã¦
ããã§ã¯åãæ¢ãããããã¾ã§è£ 飾ãå®ç¾©ãããã®ããCSSãã¨å¼ã¶ãã¨ã«ãã¾ãããï¼å³å¯ã«ã¯styleã¿ã°ã®ç®æãåå¨ãã¾ãããæ±ããç°¡åã«ããããã«CSSã¨å¼ã³ã¾ãããï¼
ãã½ã³ã³ç»é¢ã®CSS
ãã½ã³ã³ç»é¢ã§è¡¨ç¤ºããéã®CSSã«ã¤ãã¦ã¯ããããã·ã¥ãã¼ããã¼ããã¶ã¤ã³ãã¼ãã«ã¹ã¿ãã¤ãºãã¼ããã¶ã¤ã³CSSãã«è¨å ¥ãã¾ãã
ãã®é¨åã§ã¯ãCSSãã¡ã¤ã«ã¨ãã¦åé¢ãã¦ç®¡çãã¦ããããã§ãã
ã¹ããç»é¢ã®CSS
ã¹ããç»é¢ã«è¡¨ç¤ºããéã®CSSã«ã¤ãã¦ã¯ãå°ã ç°ãªãã¾ãã
åæ§ã«ããããã·ã¥ãã¼ããããã¶ã¤ã³ãã¼ãã¹ãã¼ããã©ã³ãã¨è¨ãã¨ããã¾ã§ã¯åæ§ãªã®ã§ãããCSSãã¡ã¤ã«ã¨ãã¦åé¢ãããã¦ãã¾ããã
ãã£ã¦ãç»é¢å ±éã§ä½¿ãåããããHTMLã«styleã¿ã°ãå®ç¾©ããå¿ è¦ãããã¾ãã
ä¾ãã°ãç§ã®å ´åã¯ããããã¼ã«styleã¿ã°ãè¨è¿°ãããã¨ã«ãã¦ãã¾ãããããã¼ã¯å¿ ãã©ã®HTMLã«ãåå¨ãã¾ãããããï¼ããã¿ã¼ã§ãæ§ãã¾ãããï¼
ã¾ãããã®æãCSSã¨ãã¦åé¢ããã¦ããããã§ã¯ããã¾ãããããæ示çã«styleã¿ã°ãæ¸ãè¾¼ãã§ãè£ é£¾ã«é¢ããé¨åã§ãããã¨ãæè¨ããªããã°ãªãã¾ããã
å®éã«ã¹ããã§è¡¨ç¤ºãããæã¯ããã®ãããã¼ã®styleã¿ã°ã®æ å ±ããåãã¼ã¸ã«åä½ãããã¨ããçµæã«ãªãã¾ãã
å¾ã¯ãåã¿ã°ã«å¯¾ãã¦ãclass=ãå®ç¾©ããååã ã¨ããå±æ§ãæ¸ãè¾¼ãã°ãCSSã®ä¸ã®ã©ããåæ ããããããã¨ãããã¨ãHTMLã¨CSSãåä½ãããæã«åããã¨ãã寸æ³ã§ãã
ãã¾ãï¼å¹ãåºã表示ã«ã¤ãã¦ï¼
ã§ã¯ãå¹ãåºã表示ã«ã¤ãã¦å°ã解説ãè¡ãã¾ãããã
åºæ¬çã«ã¯ã以ä¸ã®ããã°æ§ã®å 容ã§å¿ è¦ååã§ããç§ã®æ¹ã§è§£èª¬ããå 容ã¯ã»ã¨ãã©ããã¾ããï¼
å ã¿ã«ãç§ã¯ãã¯ã¦ãªè¨æ³ãã§æ¸ãã¦ãã¾ãããããããåºæºã¨ãã¦è§£èª¬ããã¦ä¸ããã
ä»ã®è¨æ³ã«ã¤ãã¦ã¯ãä¸è¨ã®ãµã¤ãã«è©³ããæ¸ããã¦ãã¾ãã
CSSãæ¸ãè¾¼ã
ãã¦ãå ãã¯è¡¨ç¤ºããããã®CSSãå®ç¾©ããªããã°ãªãã¾ããã
ãã½ã³ã³ç¨ã¨ã¹ããç¨ã§ä½¿ãåãã¦ããæ¹ï¼ã¬ã¹ãã³ã·ããã¶ã¤ã³é©ç¨ã§ãªãæ¹ï¼ã¯ãåã ã§æ¸ãè¾¼ãå¿ è¦ãããã¾ãã
ã¹ããã®å ´åã¯ãå é ã¨æ«å°¾ã«styleã¿ã°ãä»ãã¦ãããã確èªãã¦ãã ãããã
89è¡ç®ã¨90è¡ç®ããèªåã§ã«ã¹ã¿ãã¤ãºãã¦æ¸ãå¿ è¦ãããã¾ãã
ã.ã¯ã©ã¹åãã¯è¦ããããååãæ¸ãã¦ãã ããããä»å¾ããããã¿ã°ã®ä¸ã«å±æ§ã¨ãã¦æ¸ãè¾¼ã¿ã¾ãã
ç»åãç»é²ãã
ç»åãç»é²ãã¦ãåç §ããããã«ãã¾ãããã
ã§ã¯ããã嬢ãã«ç»å ´ãã¦ããããï¼ç¬ï¼
ç»åãç¨æãã¾ãããã¨ãä½åãªã¨ããã¯ã«ãããã¾ãããã
é¡ãçãä¸ã«æ¥ãããã«ãã¾ãåºæ¥ãã ãæ£æ¹å½¢ãæèãã¾ããããï¼ãã¾ãã·ãã¢ã«ãªããªãã¦ã大ä¸å¤«ã§ããï¼ããã¦ãæçµçã«ä¸¸ã®å½¢ã«ãªã£ã¦ãã¾ãã¾ããããç¸ãåãã¦ãã¾ãã¾ãã
ã§ããããå°ãä½è£ãæã£ã¦ã«ãããã¾ãããã
ããã ã»ã»ã»ã嬢ããã«ããªã£ã¦ããã»ã»ã»
ããã§ã¯ããã¯ã¦ãªãã®ããã©ãã©ã¤ãããå©ç¨ãã¾ãããã
ãã®ã¾ã¾ããã©ãã©ã¤ããã®ç»é¢ã«è¡ã£ã¦ãããã§ãããè¨äºãæ¸ãéã«ç»åãè²¼ãä»ããç®æã«ããããã©ãã©ã¤ãããé¸æãã¦ãè¯ãã§ãã
å¾ã¯ã管çããããããã«ãã©ã«ããæ°è¦ä½æãã¾ãããã
ä»äººãããã©ã«ããç´æ¥çã«åç §ãããããªãã®ã§ãå ¬éç¯å²ã¯ãèªåã®ã¿ãã«è¨å®ãã¦ãã¾ãã
å¾ã¯ãç»åãã¢ãããã¼ããã¾ãã
å³ã®æ¹ã«ãããªãªã¸ãã«ãµã¤ãºã®ç»åãä¿åãã¨ããã®ã§ãããããã§ãã¯ãã¾ããå¾ã¯ãå ã»ã©ã®ç»åãã¢ãããã¼ãã§ãã
ã¢ãããã¼ããå®äºãããããããé¸æãã¦ã¿ã¾ãããã
ããã¦ããã®ç»åã¸ã®URLãåå¾ãã¾ãã
å®éã«ä½¿ã£ã¦ã¿ã
ã§ã¯ãå ã»ã©ã®CSSã«å 容ãæ¸ãè¾¼ãã§ã¿ã¾ããããã¯ã©ã¹åã¯ojyoã«ãã¾ããï¼ç¬ï¼
.ojyo::after {background-image:url(ç»åã®URL);}
(ç»åã®URL)ã¯å ã»ã©ã³ãã¼ããURLãè²¼ãä»ãã¦ãã ãããã
ããã§ã¯ä½¿ã£ã¦ã¿ã¾ãããã
å³ã«å¹ãåºããåºãããå ´åã
<p class="r-fuki ojyo">ãããç§ã®è¨ããã¨ãèããªãã®ï¼</p>
ãããç§ã®è¨ããã¨ãèããªãã®ï¼
å·¦ã«å¹ãåºããåºãããå ´å
<p class="l-fuki ojyo">ããããªãã¦ãåºç¦ãï¼åºç¦ï¼ï¼</p>
ããããªãã¦ãåºç¦ãï¼åºç¦ï¼ï¼
ãããªæãã§ãã
æå¾ã«
ã¾ããã嬢ã§éãã§ãã¾ã£ãï½ï½
ã ãããHTMLã¨CSSã®é¢ä¿æ§ããç解ããã ããã§ããããã
ãããåããã°ãä¸ã®ä¸ã«ãã沢山ã®CSSã«ã¹ã¿ãã¤ãºã«ã¤ãã¦ã®è¨äºãç解ãããããªãã¨æãã¾ãã
ããã§ã¯ãä»åã¯ãã®ã¸ãã§ã
adiosï¼ï¼