ããã°éè¨1å¨å¹´ããã£ããã¨ãããã¼ãã«å¤æ´ãã¾ããã
åå¿é²ã§ãã
- soboku - ãã£ããã¨ãããã¼ãã«å¤æ´ãã¾ãã
- åã®ããã°ãã¼ãã§ä½¿ã£ã¦ãã¦ãå¼ã£è¶ãã¦ãããã®
- ãã®ãã¡ããäº
- ãã®ä»ãéå»ã®ããã°ãã¶ã¤ã³ã®ã«ã¹ã¿ãã¤ãºè¨äº
- ã¾ã¨ã
soboku - ãã£ããã¨ãããã¼ãã«å¤æ´ãã¾ãã
ããã°1å¨å¹´ãæ©ã«ãç½èæ¯ã§ç½«ç·çã®æåè£ é£¾ãå°ãªããã¼ãã«å¤æ´ãã¾ãããAdSenseåºåãå¤ããªãã´ãã´ãããè¦ãç®ã«ãªãã¨ãããã°èªä½ã¯ã·ã³ãã«ãªæ¹ãè¦ããããããªæ°ããã¾ãã
å½é¢ã¯ãã¡ãã®ãã¶ã¤ã³ã§æ´æ°ããã¦ããããã¨æãã¾ãã
åã®ããã°ãã¼ãã§ä½¿ã£ã¦ãã¦ãå¼ã£è¶ãã¦ãããã®
ç®æ¬¡ãããã ã¡ãã¥ã¼ãªã©ããã¼ãã«åãã£ã¦ããªããã®ãå¾ãã追å ãã¦ãã¾ãã使ãããã®ã¯ãã®ã¾ã¾ä½¿ãããã¨æãã¾ãã
ç®æ¬¡ã¡ãã¥ã¼
ç®æ¬¡ã¡ãã¥ã¼ã¯ä¸è¨ãµã¤ãããã³ããããã¦ããã ããæåã®å¤§ãããã«ã©ã¼ã調æ´ãã¦ä½¿ã£ã¦ãã¾ãã
CSSã³ã¼ãã表示ï¼æãããã¿ï¼
/*ã¢ã³ãã¼ã©ã¤ã³ã§æ®µè½åãç®æ¬¡*/
.entry-content .table-of-contents {
position: relative;
margin: 0;
padding: .5em 1.2em 1em;
background: #fff;
font-size: 180%; /* ãµã¤ãºå¤æ´ */
border-top: solid 40px #595857; /* ã«ã©ã¼å¤æ´ */
border-right: solid 2px #595857; /* ã«ã©ã¼å¤æ´ */
border-bottom: solid 2px #595857; /* ã«ã©ã¼å¤æ´ */
border-left: solid 2px #595857; /* ã«ã©ã¼å¤æ´ */
border-radius: 8px;
color: #595857; /* ã«ã©ã¼å¤æ´ */
}
.entry-content .table-of-contents::before {
content: "ç®æ¬¡";
position: absolute;
top: -33px;
left: 38px;
margin: 0;
color: #fff;
border: 0;
font-size: 160%;/* ãµã¤ãºå¤æ´ */
font-weight: bold;
}
.entry-content .table-of-contents::after {
content: "\f039";
font-family: blogicon;
position: absolute;
top: -35px;
left: 13px;
color: #fff;
font-weight: bold;
font-size: 120%;
}
.entry-content .table-of-contents li {
margin: .2em 0 1em 1em;
list-style-type: decimal;
line-height: 1.6em;
font-weight: bold;
}
.entry-content .table-of-contents li ul {
margin: 0 0 1em .5em;
padding: 0;
}
.entry-content .table-of-contents li ul li {
margin: .2em 0 0 1em;
font-weight: normal;
font-size: 80%;/* ãµã¤ãºå¤æ´ */
}
.entry-content .table-of-contents li ul li ul li {
font-size: 90%;
}
.entry-content .table-of-contents a {
color: #595857; /* ã«ã©ã¼å¤æ´ */
display: block;
text-decoration: none;
border-bottom: solid 2px #595857; /* ã«ã©ã¼å¤æ´ */
}
.entry-content .table-of-contents ul li a {
border-bottom: dashed 1px #595857; /* ã«ã©ã¼å¤æ´ */
}
/*ã¢ã³ãã¼ã©ã¤ã³ã§æ®µè½åãç®æ¬¡ ããã¾ã§ */
æé ã解説ããã¹ãããã¼
ä¸è¨ãã³ããããã¦ããã ãããµã¤ãã¨ãå°å ¥æã®æããã°ã§ãã
ã¹ãããã¼ã®CSSã³ã¼ãï¼ã¯ãªãã¯ã§å±éï¼
/***ã¹ããããã¼ãã¶ã¤ã³ï¼***/ .step-wrap1 { counter-reset:count; margin: 2em 0; position: relative; } .step-content1 { padding: 0 0 1.3em 2em; margin: 0; position: relative; } .step-content1::before { content: ""; display: block; width: 13px; height: 13px; background: #6ab5a5; border: solid 3px #ffffff; border-radius: 50%; position: absolute; top: 3px; left: 3px; box-shadow: 0 0 0 2px #6ab5a5; } .step-content1::after { content: ""; display: block; height: calc(100% - 35px); border-left: dotted 5px #768888; position: absolute; top: 30px; left: 10px; } .step-title1 { font-weight: bold; font-size: 120%; } .step-label1 { color: #768888; font-weight: bold; } .step-label1::after { counter-increment:count; content:counter(count); position: relative; left: .3em; } .step-body1 { margin-top: .5em; padding: 0 0 1em; border-bottom: dotted 2px #ddd; } .step-wrap1 > :last-of-type::after { display: none; } /***ã¹ããããã¼ãã¶ã¤ã³ï¼***/
ã¹ããç¨ããã ã¡ãã¥ã¼
以åãä¸è¨ã®ãµã¤ãããããã ã¡ãã¥ã¼ã®ã³ã¼ããé æ´ããã®ãããã®ã¾ã¾å¼ã£è¶ãã¦ãã¾ããã
ããã ã¡ãã¥ã¼ã®HTMLï¼ã¯ãªãã¯ã§å±éï¼
<!-- bottom navigation ãã¶ã¤ã³ã®ãããã¿ãã®HTMLã«è²¼ãä»ãã --> <ul class="bottom-menu"> <li> <!--ãââé ç®1. ãã¼ã ãï¼ã®é¨åã«ãã¼ã ã®URLãå ¥ãã --> <a href="https://driveon43.com/"> <i class="blogicon-home"></i><br><span class="mini-text">ãã¼ã </span></a> </li> <li class="menu-width-max"> <!-- ââé ç®2. ãããããããä¸ã®"ï¼"ã¯ãã®ã¾ã¾ --> <a href="#"><i class="blogicon-list"></i><br><span class="mini-text">ã«ãã´ãª</span></a> <ul class="menu-second-level"> <!-- ä¸ã®"#"ã®é¨åã«ãããã"è¨äºURL"ã¨ã¿ã¤ãã«çãå ¥ãã --> <li><a href="https://driveon43.com/archive/category/%E6%97%A5%E8%A8%98">æ¥è¨</a></li> <li><a href="https://driveon43.com/archive/category/%E6%9B%B8%E3%81%8F%E4%BD%9C%E6%A5%AD">æ¸ãä½æ¥</a></li> <li><a href="https://driveon43.com/archive/category/%E5%82%99%E5%BF%98%E9%8C%B2">åå¿é²</a></li> <li><a href="https://driveon43.com/archive/category/100%E8%A8%98%E4%BA%8B">100è¨äº</a></li> </ul> </li> <li> <!-- ââé ç®3.ãèªè ç»é² ââã®é¨åã®æ¸ãæããå¿ è¦ã§ã --> <!-- ~hatena.ne.jp/èªåã®ã¯ã¦ãªID/URL(http://ã®é¨åã¯ç¡ã)/subscribeã--> <a href="https://blog.hatena.ne.jp/ED105/driveon43.com/subscribe" target="_blank"> <i class="blogicon-hatenablog"></i><br><span class="mini-text">èªè ç»é²</span></a> </li> <li> <!-- ââé ç®4.ãä¸ã¸æ»ããã¿ã³ ãå¤æ´ä¸è¦ã§ã--> <div><a href="#"> <i class="blogicon-chevron-up"></i><br><span class="mini-text">ä¸ã¸æ»ã</span></a></div> </li> <li class="menu-width-max"> <!-- ââé ç®5. ç®æ¬¡ãå¤æ´ä¸è¦ã§ãâ»æ³¨æãã --> <a href="#"><i class="blogicon-list"></i><br><span class="mini-text">ç®æ¬¡</span></a> <ul class="menu-second-level"> <div id="toc"></div> </ul> </ul> <!-- ç®æ¬¡ãä½æããå --> <div id="toc"></div> <script type="text/javascript"> document.addEventListener('DOMContentLoaded', function () { var contentsList = document.getElementById('toc'); // ç®æ¬¡ã追å ããå (table of contents) var div = document.createElement('div'); // ä½æããç®æ¬¡ã®ã³ã³ããè¦ç´ // .entry-contenté ä¸ã®h2ãh3è¦ç´ ãå ¨ã¦åå¾ãã var matches = document.querySelectorAll('.entry-content h2, .entry-content h3'); // åå¾ããè¦åºãã¿ã°è¦ç´ ã®æ°ã ã以ä¸ã®æä½ãç¹°ãè¿ã matches.forEach(function (value, i) { // è¦åºãã¿ã°è¦ç´ ã®idãåå¾ã空ã®å ´åã¯å 容ãidã«ãã var id = value.id; if(id === '') { id = value.textContent; value.id = id; } // è¦ç´ ãh2ã¿ã°ã®å ´å if(value.tagName === 'H2') { var ul = document.createElement('ul'); var li = document.createElement('li'); var a = document.createElement('a'); // 追å ãã<ul><li><a>ã¿ã¤ãã«</a></li></ul>ãæºåãã a.innerHTML = value.textContent; a.href = '#' + value.id; li.appendChild(a) ul.appendChild(li); // ã³ã³ããè¦ç´ ã§ãã<div>ã®ä¸ã«è¦ç´ ã追å ãã div.appendChild(ul); } // è¦ç´ ãh3ã¿ã°ã®å ´å if(value.tagName === 'H3') { var ul = document.createElement('ul'); var li = document.createElement('li'); var a = document.createElement('a'); // ã³ã³ããè¦ç´ ã§ãã<div>ã®ä¸ããæå¾ã®<li>ãåå¾ããã var lastUl = div.lastElementChild; var lastLi = lastUl.lastElementChild; // 追å ãã<ul><li><a>ã¿ã¤ãã«</a></li></ul>ãæºåãã a.innerHTML = value.textContent; a.href = '#' + value.id; li.appendChild(a) ul.appendChild(li); // æå¾ã®<li>ã®ä¸ã«è¦ç´ ã追å ãã lastLi.appendChild(ul); } }); // æå¾ã«ç»é¢ã«ã¬ã³ããªã³ã° contentsList.appendChild(div); }); </script>
ããã ã¡ãã¥ã¼ã®CSSï¼ã¯ãªãã¯ã§å±éï¼
/* ããã ã¡ãã¥ã¼ã */ /*======================== ãsmartphoneãbottom menu ã========================*/ .mini-text{font-size:11px;}/*æå大ãã*/ ul.bottom-menu { position: fixed; left:0; bottom:0; width: 100%; height:45px;/*é«ã*/ margin:0; padding:0; background-color:#616160;/*èæ¯è²*/ z-index:30;} ul.bottom-menu li { float:left; width:20%; background-color:#595857;/*èæ¯è²*/ list-style-type:none; text-align:center; font-size:25px;/*ã¢ã¤ã³ã³ã®ãµã¤ãº*/} .bottom-menu li a { display: block; color:#ffffff;/*ã¢ã¤ã³ã³ï¼æåã®è²*/ padding-top:10px; padding-bottom:5px; line-height:10px; text-decoration:none;} .bottom-menu li a:hover { color:#a9a9a9;/*ãã¦ã¹ãªã¼ãã¼æã®è²*/ } /* === å±éã¡ãã¥ã¼ === */ ul.menu-second-level { visibility: hidden; opacity: 0; z-index:1; } ul.menu-second-level li a{ border-top:1px dashed #a9a9a9;/*å±éã®æ ç¹ç·*/ font-size:15px;/*å±éã¡ãã¥ã¼ã®æåãµã¤ãº*/ line-height:30px;/*æåã®ç¸¦å¹ */ } .menu-second-level li a:hover { height:100%; background: lightgrey;/*ãã¦ã¹ãªã¼ãã¼ã®è²*/} li.menu-width-max ul.menu-second-level { position: absolute; bottom: 47px;/*é«ã*/ left: 0; box-sizing: border-box; width: 100%; padding:0; } li.menu-width-max:hover ul.menu-second-level { bottom: 47px;/*é«ã*/ visibility: visible; opacity: 1; } li.menu-width-max ul.menu-second-level li { float: left; width: 100%; border: none;} /*PC表示ã®éã¯ããã ã¡ãã¥ã¼ã¯è¡¨ç¤ºããªã*/ @media(min-width: 768px){ .bottom-menu{display:none; } } /*ã¹ããã®æã ã*/ @media(max-width: 767px){ /*ããã ã¡ãã¥ã¼ä»ããã®ã§ããã¿ãåºä¸ããã*/ #footer{margin-bottom:48px;} } /*ãããã ã¡ãã¥ã¼ããã¾ã§ */
ãã®ãã¡ããäº
ãããããã²ã¼ã·ã§ã³ã®è¨ç½®
ãããããã²ã¼ã·ã§ã³ã¯ä»¥å使ã£ã¦ãããã¼ãContentsã®ã³ã¼ãã使ç¨ãã¦ãããä»åãã¼ããå¤æ´ããã«ããã£ã¦ããã¡ãã¯ãã®ã¾ã¾ä½¿ããã«ç ´æ£ãã¾ããã
ä¸ã§ããã ããã²ã¼ã·ã§ã³ã®ä½ãæ¹ãç´¹ä»ãããµã¤ãã«ãããããã²ã¼ã·ã§ã³ã¡ãã¥ã¼ã®ä½ãæ¹ãæ²è¼ããã¦ããã®ã§ããã®ãã¡æè¼ããäºå®ã
ããã°ãã¼ãã®åæ¨é¸æ
PCçã®ãµã¤ããã¼ãã¹ãããã¶ã¤ã³ã§ã¯è¨äºä¸ã«ããã£ã¨ä¸¦ã¶ã®ã§ãããªãé·ããªãããã£ããã§ãããã®ãªããããã
ã³ã¼ããªã©æãããã¿å±éã§ããdetailsã¿ã°ã®å°å ¥
2024å¹´5æ5æ¥å°å ¥æ¸ã¿
ãã®ä»ãéå»ã®ããã°ãã¶ã¤ã³ã®ã«ã¹ã¿ãã¤ãºè¨äº
PCã§ä¿®æ£ãã¦ããã¹ããã§ã¯æåãµã¤ãºãæå¾ éãã«è¡¨ç¤ºããã¦ãªãã£ãããã¾ããç°å¢ã«ãã£ã¦å¤ããCSSã¯é£ããã§ããã
ã¾ã¨ã
以åã®ããã°ãã¶ã¤ã³ããããã£ãããããã®ã«å¤ãã¾ããããã¤ã§ãæ»ããããã«ã³ã¼ããä¿ç®¡ãã¦ããã¾ããã