お世話になります。
wrapper
クラスの内の左側にside
クラスがあり、右側にcontents
クラスがあるレイアウトで作成しております。
デザインの都合上、side
クラスにはz-index:1
を指定し、contents
クラスにはz-index:-1
と指定しております。
ただ、下記の記述ではcontents
クラス内になるclickのリンクが動作せずに困っております。
z-index
の指定は変えずにリンクを動作させる方法はありますか?
side
クラスをz-index:2
に変更し、contents
クラスをz-index:1
に変更すれば、リンクが動作しますが、contents
クラスのz-index:-1
は変えずにリンクを動作させたいです。
ご存知の方いれば、ご教示くださいm(__)m
html
1<!doctype html> 2<html> 3<head> 4<meta charset="utf-8"> 5<title>テスト</title> 6<style type="text/css"> 7 8* { margin:0; padding:0; } 9 10html, body { 11 width:100%; 12 height:100%; 13} 14 15.wrapper { 16 width:100%; 17 height:100%; 18 display:flex; 19} 20 21.side { 22 width:20%; 23 height:100%; 24 z-index:1; 25 background:#3b738c; 26} 27 28.contents { 29 width:80%; 30 height:100%; 31 z-index:-1; 32 background:#e8606a; 33} 34 35</style> 36</head> 37 38<body> 39 40<div class="wrapper"> 41 42 <div class="side"> 43 side 44 </div> 45 46 <div class="contents"> 47 <a href="#">click</a> 48 </div> 49 50</div> 51 52</body> 53</html> 54
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2015/11/26 05:06
2015/11/26 05:29
退会済みユーザー
2015/11/26 05:38