CSS 样式偏移,如何解决_html/css_WEB-ITnose
{position:relative;display:inline;float:left;margin:0px 4px}
CSS 样式偏移,如何解决
在IE6是这样.
高版本都正常.
回复讨论(解决方案)
ie6中的margin要写成
margin:0px 2px
不行啊.亲
正常的效果是这样
在IE6下面先做正常后,然后在不同的地方写兼容
你确定这行代码导致的吗?你应该贴全部代码来让我测试
偏到上边了,是不是float到上边的?
是li的样式么,那ul的呢,是不是定位问题呀
你确定这行代码导致的吗?你应该贴全部代码来让我测试
@charset "utf-8";/*********************************************** 横向主导航条 ***********************************************/.ddsmoothmenu{}.ddsmoothmenu ul{margin:0;padding:0}/*主菜单设置*/.ddsmoothmenu ul li{position:relative;display:inline;float:left;margin:0px 4px}.ddsmoothmenu ul li a{display:block;height:30px;line-height:30px}.ddsmoothmenu ul li a span{display:block;padding:0px 15px}/*主菜单连接效果设置*/.ddsmoothmenu ul li a:link,.ddsmoothmenu ul li a:visited{color:#000}.ddsmoothmenu ul li a:hover{background:url(../images/mainmenu.gif) no-repeat center -30px}.ddsmoothmenu ul li a:hover span{color:#FFF}.ddsmoothmenu ul li a:active{background:url(../images/mainmenu.gif) no-repeat center top}.ddsmoothmenu ul li a:active span{color:#FFF}.ddsmoothmenu ul li a.selected{background:url(../images/mainmenu.gif) no-repeat center -30px}.ddsmoothmenu ul li a.selected span{color:#FFF}/*主菜单当前所在页面*/.ddsmoothmenu ul li a#menu_selected{background:url(../images/mainmenu.gif) no-repeat center top}.ddsmoothmenu ul li a#menu_selected span{color:#FFF}/*子集菜单设置*/.ddsmoothmenu ul.menulevel{position:absolute;left:0;display:none;visibility:hidden}.ddsmoothmenu ul.menulevel li{background:none;margin:0px;padding:0px;display:list-item;float:none}.ddsmoothmenu ul.menulevel li a{background:url(../images/mainmenu.gif) repeat-x left -60px;height:26px;line-height:26px;width:180px;padding:0px 5px;margin:0px;border-right:1px solid #999;border-bottom:1px solid #DFDFDF;border-left:1px solid #CCC}/*子集菜单连接效果设置*/.ddsmoothmenu ul.menulevel li ul{top:0}.ddsmoothmenu ul.menulevel li a:link,.ddsmoothmenu ul.menulevel li a:visited{color:#000}.ddsmoothmenu ul.menulevel li a:hover{background:url(../images/mainmenu.gif) repeat-x left -90px;color:#034fab;font-weight:bold}.ddsmoothmenu ul.menulevel li a.selected{background:url(../images/mainmenu.gif) repeat-x left -90px;color:#034fab;font-weight:bold}/*下拉箭头*/.ddsmoothmenu .downarrowclass{position:absolute;top:12px;right:8px}.ddsmoothmenu .rightarrowclass{position:absolute;top:8px;right:10px}/*阴影*/.ddshadow{position:absolute;left:0;top:0;width:0;height:0;background:url(../images/40.png);z-index:1}.toplevelshadow{/*opacity:0.8*/}* html .ddsmoothmenu{height:1%}/* Holly Hack for IE \*//*Holly Hack for IE7 and below*/* html .ddsmoothmenu ul li a{display:inline-block}/*IE6 hack to get sub menu links to behave correctly*//*********************************************** 纵向主导航条 ***********************************************/.ddsmoothmenu-v{padding:0px 10px 0px 15px}.ddsmoothmenu-v ul{}/*主菜单设置*/.ddsmoothmenu-v ul li{position:relative}.ddsmoothmenu-v ul li a{display:block;height:31px;line-height:31px;vertical-align:middle}.ddsmoothmenu-v ul li a span{display:block;padding:0px 20px}/*主菜单连接效果设置*/.ddsmoothmenu-v ul li a:link,.ddsmoothmenu-v ul li a:visited{background:url(../images/leftmenu.gif) no-repeat center -31px;color:#000}.ddsmoothmenu-v ul li a:hover{background:url(../images/leftmenu.gif) no-repeat center top}.ddsmoothmenu-v ul li a:hover span{color:#FFF}.ddsmoothmenu-v ul li a:active{background:url(../images/leftmenu.gif) no-repeat center top}.ddsmoothmenu-v ul li a:active span{color:#FFF}.ddsmoothmenu-v ul li .selected:link,.ddsmoothmenu-v ul li a.selected:visited,.ddsmoothmenu-v ul li a.selected:active{background:url(../images/leftmenu.gif) no-repeat center top}.ddsmoothmenu-v ul li a.selected span{color:#FFF}/*主菜单当前所在页面*/.ddsmoothmenu-v ul li a#menu_selected{background:url(../images/leftmenu.gif) no-repeat center top}.ddsmoothmenu-v ul li a#menu_selected span{color:#FFF}/*子集菜单设置*/.ddsmoothmenu-v ul.menulevel{position:absolute;top:0;visibility:hidden;border-top:1px solid #CCC}.ddsmoothmenu-v ul.menulevel li{background:none;margin:0px;padding:0px;display:list-item}.ddsmoothmenu-v ul.menulevel li a{background:url(../images/mainmenu.gif) repeat-x left -60px;height:26px;line-height:26px;width:180px;padding:0px 5px;margin:0px;border-right:1px solid #999;border-bottom:1px solid #DFDFDF;border-left:1px solid #CCC}/*子集菜单连接效果设置*/.ddsmoothmenu-v ul.menulevel li a:link,.ddsmoothmenu-v ul.menulevel li a:visited{color:#000}.ddsmoothmenu-v ul.menulevel li a:hover{background:url(../images/mainmenu.gif) repeat-x left -90px;color:#034fab;font-weight:bold}.ddsmoothmenu-v ul.menulevel li a.selected{background:url(../images/mainmenu.gif) repeat-x left -90px;color:#034fab;font-weight:bold}/*子集菜单连接效果设置*/.ddsmoothmenu-v ul.menulevel li a:link,.ddsmoothmenu-v ul.menulevel li a:visited{color:#000}.ddsmoothmenu-v ul.menulevel li a:hover{background:url(../images/mainmenu.gif) repeat-x left -90px;color:#034fab;font-weight:bold}.ddsmoothmenu-v ul.menulevel li a.selected{background:url(../images/mainmenu.gif) repeat-x left -90px;color:#034fab;font-weight:bold}/*左侧箭头*/.ddsmoothmenu-v .rightarrowclass{position:absolute;top:10px;right:10px}.ddsmoothmenu-v ul.menulevel .rightarrowclass{position:absolute;top:8px;right:10px}/* Holly Hack for IE \*/* html .ddsmoothmenu-v ul li {float:left;height:1%}* html .ddsmoothmenu-v ul li a {height:1%}
把项目打包发上来吧。。没得调试,难以看出是啥问题。。。

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











이 기사는 HTML & lt; Progress & Gt에 대해 설명합니다. 요소, 그 목적, 스타일 및 & lt; meter & gt의 차이; 요소. 주요 초점은 & lt; progress & gt; 작업 완료 및 & lt; meter & gt; Stati의 경우

이 기사는 HTML & LT; Datalist & GT에 대해 논의합니다. 자동 완성 제안을 제공하고, 사용자 경험을 향상시키고, 오류를 줄임으로써 양식을 향상시키는 요소. 문자 수 : 159

기사는 HTML5 크로스 브라우저 호환성을 보장하기위한 모범 사례에 대해 논의하고 기능 감지, 점진적 향상 및 테스트 방법에 중점을 둡니다.

이 기사는 HTML & lt; meter & gt에 대해 설명합니다. 범위 내에 스칼라 또는 분수 값을 표시하는 데 사용되는 요소 및 웹 개발의 일반적인 응용 프로그램. & lt; meter & gt; & lt; Progress & Gt; 그리고 Ex

이 기사는 html5 & lt; time & gt; 시맨틱 날짜/시간 표현 요소. 인간이 읽을 수있는 텍스트와 함께 기계 가독성 (ISO 8601 형식)에 대한 DateTime 속성의 중요성을 강조하여 Accessibilit를 향상시킵니다.

이 기사에서는 브라우저에서 직접 사용자 입력을 검증하기 위해 필요한, Pattern, Min, Max 및 Length 한계와 같은 HTML5 양식 검증 속성을 사용하는 것에 대해 설명합니다.

이 기사는 모바일 장치의 반응 형 웹 디자인에 필수적인 Viewport Meta Tag에 대해 설명합니다. 적절한 사용이 최적의 컨텐츠 스케일링 및 사용자 상호 작용을 보장하는 방법을 설명하는 반면, 오용은 설계 및 접근성 문제로 이어질 수 있습니다.

이 기사는 & lt; iframe & gt; 외부 컨텐츠를 웹 페이지, 공통 용도, 보안 위험 및 객체 태그 및 API와 같은 대안을 포함시키는 태그의 목적.
