【问题标题】:Custom Navigation Bar (html/css) for a website [closed]网站的自定义导航栏(html/css)[关闭]
【发布时间】:2013-11-01 08:45:48
【问题描述】:

我正在制作一个网站,并且有一个很酷的导航栏,它看起来像这样:

编辑 - 不小心删除了所有的 css 代码,只有导航固定在底部 - 编辑

我设法使它看起来像这样:http://pokemasters.freeiz.com/bare.html 我只是没有想法......我得到了我单独制作的图像,一个导航栏:

&按钮:

我正在寻找一个全宽导航栏,它可以根据不同的屏幕进行调整,位于屏幕底部,活动或悬停时为红色按钮,正常时为白色按钮,上面有 pokeball 线,并且覆盖按钮

有人能指点我正确的方向吗??

【问题讨论】:

    标签: html css customization shape navbar


    【解决方案1】:

    你想做什么?不清楚。您不需要在#navigation li a.profile 中使用图像,而是可以使用背景颜色。

    #navigation li a.profile {
        width: 240px;
        background-color:#ffffff;
        text-decoration: none;
        }
        #navigation li a.profile:hover {
        background-color:red;
        background-position: -240px;
        text-decoration: none;
        }
        #navigation li a.profile:current {
        background-color:#cccccc;
        background-position: -240px;
        background-repeat: no-repeat;
        text-decoration: none;
        }
    

    或者如果你想要全宽导航栏。

    #navigation ul {
        list-style: none;
        text-align: center;
        width:100%;
        }
    
        #navigation li {
        display: inline;
        width:16.6%;
        border-right:1px solid #ccc;
        }
        #navigation li:last-child{
        border-right:none;
        }
    

    如果您想要导航栏上方的“球”图像。请使用#navigation 'div' 上方的<span> 并设置其背景图像'ball' 图像。

    <span class=ball_Img> 的属性

    .ball_Img{
      background:url('whatever');
      position:relative;
      z-index:5;
    }
    
    #navigation{
     .......//property previous define please write here.
    position:relative;
    top:-50px;  // you can change according to your situation.      
    }
    

    【讨论】:

    • 我想制作一个全宽导航栏,它位于屏幕底部,看起来像精灵球的底部。白色按钮,在悬停或活动时为红色,并且在这些按钮的正上方中间有一条带有省略号的黑线,就像图片上一样:i.imgur.com/iB7r0Ar.png
    • 我已经编辑了我的答案@MikeStardust,可能对你有帮助。
    • 确实有帮助:) 谢谢:)
    【解决方案2】:

    所以你想要一个全宽的导航栏?元素自动拉伸?或者?为什么要使用图像来获得颜色?你可以只使用背景:红色;悬停或活动时,背景:正常状态下为白色

    【讨论】:

    • 我是 html 的新手,但对 Photoshop 很友好,所以我只是做了我所知道的:) 是的,我确实想要一个全宽度导航栏,可以根据不同的屏幕尺寸进行自我调整:) 哦那么让我改变一下:)
    • 哦,导航栏上方的那个圆形的东西会被包含在导航栏中吗?
    • 是的:)我试图让它看起来像一个精灵球的底部;)我尝试使用背景颜色:#xxxxx;这是完全相同的事情,颜色设置不正确:S必须有办法做到这一点......谢谢您的输入:)
    • 我还希望按钮位于 pokeball 的圆形中心下方,如图所示 (i.imgur.com/iB7r0Ar.png),但现在我只想正确设计:)
    • 给你麦克:your nav bar
    猜你喜欢
    • 1970-01-01
    • 2011-12-11
    • 1970-01-01
    • 2012-03-12
    • 2015-05-14
    • 2015-02-20
    • 2012-06-10
    相关资源
    最近更新 更多