我认为这是回答你的问题,你应该使用JavaScript。一个小脚本,并删除一些CSS的行。
https://jsfiddle.net/prsebqg3/
HTML文件
<span id="span3" tabindex="0">Hide Me</span>
<span id="span2" tabindex="0">Show Me</span>
<p id="alert" >Some alarming information here</p>
<script>
document.getElementById("span3").onclick = function() {functionHide()};
function functionHide() {
document.getElementById("span2").style.display = "block";
document.getElementById("span3").style.display = "none";
document.getElementById("alert").style.display = "none";
}
document.getElementById("span2").onclick = function() {functionShow()};
function functionShow() {
document.getElementById("span2").style.display = "none";
document.getElementById("span3").style.display = "block";
document.getElementById("alert").style.display = "block";
}
</scrip>
css文件
#span2{
display:none;
}
不明白你在说什么 –
什么ü的意思是说的人吗? –
是的,似乎也适合我工作 –