画面下にfixedで固定しているナビにintro.jsでガイドを付ける際にz-indexで子要素のみをハイライトしたいが、子要素のz-indexが効かない
html
1<div class="footer_nav"> 2 <div id="nav1" class="nav">HOME</div> 3 <div id="nav2" class="nav">PAGE1</div> 4 <div id="nav3" class="nav">PAGE2</div> 5 <div id="nav4" class="nav">PAGE3</div> 6</div> 7<script type="text/javascript" src="./intro.js"></script> 8<script> 9window.onload = windowIntro; 10function windowIntro(){ 11 var intro = introJs(); 12 intro.setOptions({ 13 steps: [ 14 { 15 element: '#nav1', 16 intro: "説明1", 17 position: 'top', 18 },{ 19 element: '#navi2', 20 intro: "説明2", 21 position: 'top', 22 },{ 23 element: '#nav3', 24 intro: '説明3', 25 position: 'top' 26 },{ 27 element: '#nav4', 28 intro: "説明4", 29 position: 'top' 30 },{ 31 element: '#nav5', 32 intro: '説明5', 33 position: 'top' 34 } 35 ] 36 }); 37 intro.start(); 38} 39</script>
css
1 .footer_nav { 2 display: flex; 3 background: #eee; 4 position: fixed; 5 bottom: 0; 6 left: 0; 7 right: 0; 8 height: 50px; 9} 10.nav { 11 width: 100% 12 text-align: center; 13}
intro.js
https://github.com/usablica/intro.js/blob/master/intro.js
回答3件
あなたの回答
tips
プレビュー