2015-03-30 58 views
0

我一直在研究Asp.net中的论坛,我遇到的问题是,当我用鼠标光标悬停在我的div上时,它会将每个细节都从不透明转换为带下划线的文本,但是当我将光标移离div,它不会回到之前的状态'正常状态'。Asp.net Css悬停错误

我在一个普通的html页面上构建我的代码,一切工作正常,当我将它集成到我的Asp.net模板中时,它开始执行此错误。我知道这可能是很多事情,我检查了模板的所有CSS,一切看起来都不错,但它们应该没有冲突,但我一定错过了一些东西。我不能把所有的代码,因为它的CSS和HTML的很多行,所以这是它的一部分。希望你们可以给我一些指引来看看。

CSS

ul { 
    list-style: none; 
    margin: 0px; 
    padding: 0px; 
} 

#content { 
    background-color: white; 
    margin-top: 15px; 
    padding: 10px; 
    height: 1200px; 
} 

    #content h2 { 
     font-family: Tahoma, Arial, Helvetica, sans-serif; 
     font-size: 23px; 
     color: black; 
     margin: 0; 
     margin-top: 10px; 
    } 

    #content p { 
     font-family: "Tahoma", Arial, Helvetica, sans-serif; 
     font-size: 13px; 
     padding-left: 15px; 
     margin: 0; 
     width: 90%; 
    } 



.forum-group { 
    width: 948px; 
    height: 259px; 
    margin-left: auto; 
    margin-right: auto; 
} 

.header-2 { 
    width: 948px; 
    height: 35px; 
} 

.child-forum { 
    width: 310px; 
    height: 106px; 
    float: left; 
    background-image: url('images/forum-child-background2.jpg'); 
    opacity: 0.9; 
    filter: alpha(opacity=90); 
    margin-left: 6px; 
    margin-bottom: 4px; 
    border-radius: 10px; 
} 

    .child-forum:hover { 
     opacity: 1.0; 
     filter: alpha(opacity=100); 
    } 

.child-forums { 
    width: 948px; 
    height: 219px; 
} 

.forum-link { 
    width: 309px; 
    height: 106px; 
    display: inline-block; 
} 

.forum-icon { 
    width: 60px; 
    height: 60px; 
    display: inline-block; 
    background-image: url('images/hot_forum.png'); 
} 

.forum-details { 
    width: 220px; 
    height: 43px; 
    display: inline-block; 
} 

.forum-title { 
    width: 217px; 
    height: 18px; 
    display: inline-block; 
    color: white; 
    font-size: 16px; 
    margin-left: 10px; 
} 

.forum-desc { 
    width: 217px; 
    height: 15px; 
    display: inline-block; 
    color: grey; 
    font-size: 12px; 
    margin-left: 10px; 
} 

HTML内容页

<%@ Page Title="" Language="C#" MasterPageFile="~/masterPage.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="aspnetw24prise2.Default" %> 

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> 
    <link rel="stylesheet" href="css/skel.css" /> 
    <link rel="stylesheet" href="css/style.css" /> 
    <link rel="stylesheet" href="css/style-desktop.css" /> 
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> 

    <div id="content"> 
     <br /><br /> 
     <div class="forum-group"> 
      <h2 class="header-2">Community</h2> 
      <ul class="child-forums"> 
       <li class="child-forum"> 
        <a class="forum-link" href="#"> 
         <span class="forum-icon"></span> 
         <span class="forum-details"> 
          <span class="forum-title">General Discussion</span> 
          <span class="forum-desc">Discuss about cars</span> 
         </span> 
        </a> 
       </li> 
       <li class="child-forum"> 
        <a class="forum-link" href="#"> 
         <span class="forum-icon"></span> 
         <span class="forum-details"> 
          <span class="forum-title">Latest News</span> 
          <span class="forum-desc">Talk about new stuff</span> 
         </span> 
        </a> 
       </li> 
       <li class="child-forum"> 
        <a class="forum-link" href="#"> 
         <span class="forum-icon"></span> 
         <span class="forum-details"> 
          <span class="forum-title">Rules</span> 
          <span class="forum-desc">Important for new members</span> 
         </span> 
        </a> 
       </li> 
       <li class="child-forum"> 
        <a class="forum-link" href="#"> 
         <span class="forum-icon"></span> 
         <span class="forum-details"> 
          <span class="forum-title">Events</span> 
          <span class="forum-desc">Stay in touch</span> 
         </span> 
        </a> 
       </li> 
       <li class="child-forum"> 
        <a class="forum-link" href="#"> 
         <span class="forum-icon"></span> 
         <span class="forum-details"> 
          <span class="forum-title">Media</span> 
          <span class="forum-desc">Videos & pictures</span> 
         </span> 
        </a> 
       </li> 
       <li class="child-forum"> 
        <a class="forum-link" href="#"> 
         <span class="forum-icon"></span> 
         <span class="forum-details"> 
          <span class="forum-title">FAQ</span> 
          <span class="forum-desc">Get answers</span> 
         </span> 
        </a> 
       </li> 
      </ul> 
     </div> 
</asp:Content> 
+0

您应该提供一个指向您的问题页面的链接。 – 2015-03-30 19:58:16

+0

希望我能! – JeffLA 2015-03-30 20:16:11

+0

你可以。 ASP.NET与这个问题无关。大多数人(比如我自己)不想简单地拼凑代码来尝试重新创建问题。 – 2015-03-30 21:35:16

回答

0

只是想检查......你已经 '.child论坛' 设置为 '不透明度:0.9'。这与悬停的不透明度几乎相同。

将'.child-forum'设置为0,然后仔细检查它确实不起作用。可能很难说。 (?)

+0

谢谢你的答案,但它不关于不透明我累了! – JeffLA 2015-03-31 12:23:43