CSS:Chrome宽度问题

时间:2014-12-08 09:37:13

标签: css google-chrome

请帮助css& chrome,旧版本的chrome最后一个菜单项在新行上呈现,但在firefox&&新版本的Chrome都很好用。

屏幕(远程调试): remote debug 桌面铬: enter image description here 内容: enter image description here

CSS代码:

/* menu start */
.menu, .menu * {
    white-space: nowrap;
}
div#mainmenu-wrapper {
    margin: 25px auto;
    width: 1100px;
}
ul#mainmenu{
    width: 1100px;
    margin: auto;
    padding: 0;
}
ul#mainmenu:after {
    clear: both;
    content: "";
    display: block;
    height: 1px;
    visibility: hidden;
    margin-left:1100px;
}
#mainmenu li {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    border-radius: 9px 0;
    -moz-box-shadow: 0 0 1px 1px #ffffff;
    -webkit-box-shadow: 0 0 1px 1px #ffffff;
    box-shadow: 0 0 1px 1px #ffffff;
    filter: progid:DXImageTransform.Microsoft.dropshadow(offX=0, offY=0, color=#ffffff);
    float: left;
    display: inline;
    margin-right: 10px;
    padding: 5px 0 7px;
    height: 38px!important;
}
#mainmenu li:last-child {
    margin-right: 0;
}
#mainmenu a {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background-color: #4d4d4d;
    -moz-border-radius: 9px 0;
    -webkit-border-radius: 9px 0;
    border-radius: 9px 0;
    box-shadow: 0 -3px #262626 inset;
    font-size: 19px;
    padding: 5px 18px 7px;
    width: auto;
    height: auto;
    display: inline;
}
#mainmenu a:hover{
    text-decoration: underline;
}
li.selected a{
    color: #f00;
}
/* menu end */

2 个答案:

答案 0 :(得分:0)

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, image, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: top; }
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block;}
body {line-height: 1;}
ol, ul { list-style: none;}
blockquote, q { quotes: none;}
blockquote:before, blockquote:after, q:before, q:after {content: ''; content: none;}
table { border-collapse: collapse; border-spacing: 0;}
b {font-weight:bold;}
a {text-decoration:none; border:none;}

在你的css之前使用这个破解css。

答案 1 :(得分:0)

OMG O_O。我发现了问题,设备上缺少“PT Sans”字体。