Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何组合菜单栏和x27;带有第'页的s代码;s代码?_Css - Fatal编程技术网

Css 如何组合菜单栏和x27;带有第'页的s代码;s代码?

Css 如何组合菜单栏和x27;带有第'页的s代码;s代码?,css,Css,我有一个php页面,它有css脚本。 我想把菜单栏放在那个页面上。如何在那个页面上显示菜单栏而不干扰那个页面的css设置? 菜单栏的设置: <style type="text/css"> .menubar { margin:0 auto; padding:0; } html { background:#ffffff; } body

我有一个php页面,它有css脚本。 我想把菜单栏放在那个页面上。如何在那个页面上显示菜单栏而不干扰那个页面的css设置? 菜单栏的设置:

<style type="text/css">
        .menubar { margin:0 auto;
                   padding:0;
                   }
                html { background:#ffffff; }
                body{
                         width:900px;
                         height:1000px;
                         overflow:auto;
                         background:#ffffff;
                        }
                div#menu {
                                margin:40px 0 0 95px;
                                text-align:center;
                                position:absolute;
                                }
                div#menu span {
                                font-size:22px;
                                padding-left:14px;
                                }
                div#copyright {

                                font:11px 'Trebuchet MS';
                                color:#fff;
                                text-align:center;
                                clear:left;
                                position:absolute;
                                top:546px;
                                width:560px;
                                }
                div#copyright a { color:#425B7B; }
                div#copyright a:hover { color:#fff; }
</style>
<style type="text/css">
            body
            {
                    font-family:Times new roman, verdana;
                    font-size:22px;
                    width: 900px;
                    height:70px;
                    margin-left: auto;
                    margin-right: auto;
                    margin-top: 6px;
                    background-image:url("wood_texture2.jpg");
            }
    </style>

.menubar{margin:0自动;
填充:0;
}
html{background:#ffffff;}
身体{
宽度:900px;
高度:1000px;
溢出:自动;
背景:#ffffff;
}
div#菜单{
利润率:40px095px;
文本对齐:居中;
位置:绝对位置;
}
div#菜单范围{
字体大小:22px;
左侧填充:14px;
}
div#版权所有{
字体:11px‘投石机MS’;
颜色:#fff;
文本对齐:居中;
清除:左;
位置:绝对位置;
顶部:546px;
宽度:560px;
}
版权所有a{color:#425B7B;}
div#版权a:hover{color:#fff;}
页面的设置:

<style type="text/css">
        .menubar { margin:0 auto;
                   padding:0;
                   }
                html { background:#ffffff; }
                body{
                         width:900px;
                         height:1000px;
                         overflow:auto;
                         background:#ffffff;
                        }
                div#menu {
                                margin:40px 0 0 95px;
                                text-align:center;
                                position:absolute;
                                }
                div#menu span {
                                font-size:22px;
                                padding-left:14px;
                                }
                div#copyright {

                                font:11px 'Trebuchet MS';
                                color:#fff;
                                text-align:center;
                                clear:left;
                                position:absolute;
                                top:546px;
                                width:560px;
                                }
                div#copyright a { color:#425B7B; }
                div#copyright a:hover { color:#fff; }
</style>
<style type="text/css">
            body
            {
                    font-family:Times new roman, verdana;
                    font-size:22px;
                    width: 900px;
                    height:70px;
                    margin-left: auto;
                    margin-right: auto;
                    margin-top: 6px;
                    background-image:url("wood_texture2.jpg");
            }
    </style>

身体
{
字体系列:泰晤士报新罗马版,verdana;
字体大小:22px;
宽度:900px;
高度:70像素;
左边距:自动;
右边距:自动;
边缘顶部:6px;
背景图片:url(“wood_texture2.jpg”);
}

唯一冲突的代码是body元素,在这种情况下,您必须决定每个属性需要哪些值。例如,您需要选择页面的宽度是800还是900像素。

将菜单栏CSS代码中的*替换为菜单栏对象的名称。例如,页面css中的正文表示“将此样式应用于页面”

如果将*替换为.menubar并添加

class="menubar"

到菜单栏对象,然后菜单栏将选择顶部样式。

我决定使用900px。。我希望菜单背景紧跟在页面背景之后,或者变得透明。我必须将class=“menubar”?放在正文中的什么位置,或者放在正文中的css脚本中的什么位置。应该是。。。或