本文介绍了悬停显示问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我在理解显示和悬停时遇到了问题。 我正试图将鼠标悬停在一个问题上并显示答案。 ..问号{ 颜色:#fff; 背景:紫色; 宽度:300px; font-weight:bold; padding-left:5px; } ..回答{ 颜色:#000; 背景:#fff; 宽度:500px; 填充: 0px 20px 0px 20px; display:none; } < div class =" question"> This是一个问题< / div> < div class =" answer">这就是答案。这就是答案。这是 答案。这就是答案。这就是答案。这就是答案。这个 就是答案。这就是答案。这就是答案。这是 答案。这就是答案。这就是答案。这就是答案。这个 就是答案。这就是答案。这就是答案。 < / div> ..hover:question {display .answer} 完全丢失。I''m having problems understanding display and hover.I''m trying to hover over a question and have the answer display...question {color: #fff;background: purple;width: 300px;font-weight: bold;padding-left: 5px;}..answer {color: #000;background: #fff;width: 500px;padding: 0px 20px 0px 20px;display: none;}<div class="question">This is a question</div><div class="answer">This is the answer. This is the answer. This is theanswer. This is the answer. This is the answer. This is the answer. Thisis the answer. This is the answer. This is the answer. This is theanswer. This is the answer. This is the answer. This is the answer. Thisis the answer. This is the answer. This is the answer. </div>..hover:question {display .answer}Totally lost.推荐答案 http: //www.w3.org/TR/CSS1#basic-concepts ''显示'' 价值:内联|块| list-item |磨合|内联块| 表|内联表| table-row-group | table-header-group | table-footer-group |表格行table-column-group | table-column | table-cell |表格标题|没有|继承 http://www.w3 .org / TR / CSS21 / visuren.html#display-prop - Spartanicus http://www.w3.org/TR/CSS1#basic-concepts''display''Value: inline | block | list-item | run-in | inline-block |table | inline-table | table-row-group | table-header-group |table-footer-group | table-row | table-column-group | table-column |table-cell | table-caption | none | inherit http://www.w3.org/TR/CSS21/visuren.html#display-prop--Spartanicus http ://www.w3.org/TR/CSS1#basic-concepts ''显示'' 价值:内联|块| list-item |磨合|内联块| 表|内联表| table-row-group | table-header-group | table-footer-group |表格行table-column-group | table-column | table-cell |表格标题|没有|继承 http://www.w3 .org / TR / CSS21 / visuren.html#display-prop 确实。 ..问题:悬停。回答{display:block;} - Rik WasmusIndeed...question:hover .answer{display:block;}--Rik Wasmus 这是一种错误的方法,至少在创作WWW时是这样的(这是我们在这里讨论的b $ b)。在向用户披露必要的b / b $ b信息时,你会依赖CSS,从而忽略了常见的CSS警告。That''s a wrong approach, at least in authoring for the WWW (which is what wediscuss here). You would rely on CSS in matters of disclosing essentialinformation to the user, thereby ignoring the usual CSS caveats. 是的,你是; 悬停元素后,你不能改变另一个元素的属性。 - Jukka K. Korpela (Yucca) http://www.cs。 tut.fi/~jkorpela/Yes, you are; you can''t change the properties of another element uponhovering an element.--Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/ 这篇关于悬停显示问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-15 05:21