我想要做的就是将鼠标悬停在以橙色显示的任何元素上时,更改以绿色标记的元素的旋转。我知道你可以拥有的东西像从不同类别编辑类
ul li.classname
我已经试过这样的事情,但不认为我完全理解不同层次去通过访问不同的元素。
代码本身:
<!-- Begin Links To Different Pages -->
<nav id="navigation" style="margin-top:-15px;margin-left:-50px">
<ul style="list-style:none" class="test">
<a href="index.html"><img id="home-button" src="images/Home_Button.png"></a>
<!-- Sweets Link -->
<li class="sweets-tabVis"><a href="ProductsPage.html"><img id="sweets-button" src="images/Sweets_Button.png"></a></li>
<ul style="list-style:none" class="sweets-tabInVis">
<li class="test"><a href="ProductsPage.html"><img src="images/AllSweets_Button-Dropdown.png"></a></li>
<!-- Begin Type Tab -->
<li class="type" style="margin-top:-6px;"><a href="http://www.google.co.uk"><img src="images/Type_Button-Dropdown.png"></a></li>
<!-- Begin Sublink Type Navigation -->
<li class="sweets-sublink" style="margin-top:-62px;">
<a href="ProductsPage.html" ><img src="images/Boiled_Button-Dropdown.png"></a>
<a href="ProductsPage.html" ><img style="margin-top:-7px;" src="images/Chewy_Button-Dropdown.png"></a>
<!-- End Sublink Type Navigation -->
</li>
<li style="margin-top:-7px;"><a href="ProductsPage.html"><img src="images/Flavours_Button-Dropdown.png"></a></li>
<!-- End Type Tab -->
</ul>
<a href="ContactUs.html"><img id="contact-button" style="margin-left:250px;" src="images/Contact_Button.png"></a>
<!-- Begin Links To Different Pages -->
<section>
<img id="search-bar" src="images/Search_bar.png">
<input id="search-box" style="position:absolute;margin-top:-70px;margin-left:920px;height:20px;font-family:Hobo Std;font-size:14px;width:150px" value="Search..." type="text"> </input>
</section>
</ul>
</nav>
<!-- End Navigation -->
感谢您的帮助!
你会编辑你的问题,使其更清楚。你的意图目前还不清楚。具体来说:对橙色线的操作会对绿色标记的线产生什么影响? – enhzflep
那么现在呢,我只是想知道如何实际编辑这些行(哪一行css会授予我访问权限),然后我将在后面的所有CSS中加入。 – user2799788
简单。在您最喜欢的浏览器中打开页面,然后右键单击您感兴趣的元素。您可以看到与该元素关联的样式。您还将获得适用的所有CSS规则的文件和行号。在(Google)Chrome的上述评论中对您的用户名这么做,Chrome告诉我相关的样式是:'a.comment-user.owner','a.comment-user','a:visited','。所有者','a' – enhzflep