Home  >  Article  >  Web Front-end  >  样式问题_html/css_WEB-ITnose

样式问题_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:52:281139browse

div1,div2漂浮,点击隐藏按钮,div1隐藏,div2位置不变,点击显示按钮,div1显示,但是div2的位置出现在div1结束位置的下方;隐藏与显示的时候,我都设置了div2的位置;


回复讨论(解决方案)

贴下html css

.navigation {   
        margin-left:200px;                 
    }
    .navigation ul {
        width:450px;
        line-height:40px;
        list-style:none;
    }
    .navigation ul li {   
        text-align:center; 
        float:left;
        width:70px;                                     
        color:#fff;
    }
    .navigation ul li a{
        text-decoration:none;  
        color:#fff;
        display:block;
    } 


        

            
                                  
                    
  • 编辑

  •                 
  • 新增

  •             

        

        

            
            条/共计
    

        

            

                    
  • 保存
  •                 
                    
  • 关闭

  •             

        

    
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn