我正在寫HTML5/CSS3中的網頁的草圖,我觀察到MathJax中的內容與Z索引有關的意外行爲。MathJax中的內容的意外Z索引
我的想法是通過垂直滾動顯示以下圖片,名稱和聯繫人以及下面顯示的內容,並將其固定在頂部div
。
由於this updated JSFiddle節目,似乎一切工作,但一兩件事:通過MathJax界定的數學定界符\(
和\)
流動的#top
DIV和圖像上面,下面沒有像文字各地。
以下與更新z-index
es,也應該在Chrome和Opera(在Windows)和Chrome和Android瀏覽器(在三星S3和S4上測試)上重現問題。
<!DOCTYPE html>
<html lang="en">
<head>
<title>Name Surname</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("MathMenu Ready",function() {
MathJax.Menu.BGSTYLE["z-index"] = 1;
});
</script>
<script type="application/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<style>
#wrap {
margin: 0px auto;
padding: 10px;
padding-top: 0px;
width: 920px;
text-align: left;
background-color: #fff;
}
p {
margin: 0px;
padding: 0px;
text-align: left;
}
a {
text-decoration: none;
color: #096;
}
.clb {
clear: both;
}
#top {
background-color: #eee;
position: fixed;
margin: auto;
margin-top: 0px;
width: 900px;
height: 330px;
padding: 10px;
}
#topl {
float: left;
width: 450px;
height: 310px;
padding: 10px 0px;
-webkit-position: relative;
position: relative;
-webkit-z-index: 200;
z-index: 200;
}
#bimg {
height: 306px;
width: 306px;
margin: 0px auto;
border-radius: 22px;
border: 3px solid #000;
-webkit-position: relative;
position: relative;
-webkit-z-index: 200;
z-index: 200;
}
#bimg img {
height: 300px;
width: 300px;
margin: auto;
border-radius: 20px;
border: 3px solid #fff;
-webkit-position: relative;
position: relative;
-webkit-z-index: 200;
z-index: 200;
}
#topr {
float: right;
width: 450px;
height: 310px;
padding: 10px 0px;
-webkit-position: relative;
position: relative;
-webkit-z-index: 200;
z-index: 200;
}
#topr h1 {
margin-top: 50px;
margin-bottom: 20px;
font-size: 24pt;
font-weight: bold;
}
#topr p {
font-size: 11pt;
margin-bottom: 9pt;
}
#cont {
margin: auto;
margin-top: 0px;
width: 900px;
padding: 10px;
padding-top: 355px;
}
#cont p {
font-size: 13pt;
margin-bottom: 10pt;
}
</style>
</head>
<body>
<div id="wrap">
<div id="top">
<div id="topl">
<div id="bimg"><img src="http://matteoallegro.joomlafree.it/kb.png" alt="Image"></div>
</div>
<div id="topr">
<h1>Name Surname</h1>
<p><a>[email protected]</a></p>
</div>
<div class="clb"></div>
</div>
<div id="cont">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<p>Elliptic curve \(y^2=x^3-x\) over \(\mathbb{F}_{89}\)</p>
<p>Elliptic curve \(y^2=x^3-x\) over \(\mathbb{F}_{89}\)</p>
<p>Elliptic curve \(y^2=x^3-x\) over \(\mathbb{F}_{89}\)</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
</div>
</body>
</html>
參考用於第一<script>
here。我根本不知道javascript,但是我注意到在https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML中z-index出現了兩次(三次?)次,顯然值爲101和102.
未來的注意事項:cdn.mathjax.org即將結束生命週期,請查看https://mathjax.org/cdn-shutting-down獲取遷移提示。 –