问题

我创建了一个完全由CSS完成的下拉菜单,使用了教程中介绍的绝对定位方法。 效果很好。 在Safari中,它运行缓慢,缓慢,并且链接间隔开。

该下拉菜单可在Safari以外的所有浏览器中完美运行。 为什么?

  • Home

    • About Us
    • Contact Us
    • Managed Services
  • Computer

    • Malware Removal
    • Diagnostic
    • Backup & Restore
    • Data Recovery
    • Phone Accessories
  • Security

    • Surveillance
    • Security Systems
  • Home Automation

    • HAI
    • RTI
  • Home Audio / Video

    • TV Installation
    • Wall Mounting
    • Sound Systems
    • Home Theater
    • Munitio Earphones

的CSS

/* Header */

#nav {

margin-left: 9%;

list-style: none;

font-weight: bold;

margin-bottom: 10px;

margin-top: 40px; /* Clear floats */

float: left;

width: 90%; /* Bring the nav above everything else--uncomment if needed.

position: relative;

*/

z-index: 5;

}

#nav li {

float: left;

margin-right: 2%;

}

#nav a {

display: block;

padding: 5px;

color: black;

background: none;

text-decoration: none;

font-size: 14px;

-webkit-transition: color 0.2s, text-shadow 0.3s;

-moz-transition: color 0.2s, text-shadow 0.3s;

-o-transition: color 0.2s, text-shadow 0.3s;

-ms-transition: color 0.2s, text-shadow 0.3s;

transition: color 0.2s, text-shadow 0.3s;

}

#nav a:hover {

color: white;

background: none;

text-decoration: none;

text-shadow: 0px 0px 3px #000;

}

/*---DROPDOWN ---*/

#nav ul {

z-index: 5;

background: none; /* Adding a background makes the dropdown work properly in IE7+. Make this as close to your page's background as possible (i.e. white page == white background). */

background: rgba(255,255,255,0); /* But! Let's make the background fully transparent where we can, we don't actually want to see it if we can help it... */

list-style: none;

width: 0px;

overflow: hidden;

color:white;

left: -9999px; /* Hide off-screen when not needed (this is more accessible than display: none;

*/

-webkit-transition: color 0.2s, text-shadow 0.3s;

-moz-transition: color 0.2s, text-shadow 0.3s;

-o-transition: color 0.2s, text-shadow 0.3s;

-ms-transition: color 0.2s, text-shadow 0.3s;

transition: color 0.2s, text-shadow 0.3s;

}

#nav ul li {

padding-top: 1px; /* Introducing a padding between the li and the a give the illusion spaced items */

color:white;

float: none;

}

#nav ul a {

white-space: nowrap; /* Stop text wrapping and creating multi-line dropdown items */

}

#nav li:hover ul {

/* Display the dropdown on hover */

left: 0; /* Bring back on-screen when needed */

overflow: hidden;

width: 150px;

-webkit-transition: width 0.2s;

-moz-transition: width 0.2s;

-o-transition: width 0.2s;

-ms-transition: width 0.2s;

transition: width 0.2s;

}

#nav li:hover a {

/* These create persistent hover states, meaning the top-most link stays 'hovered' even when your cursor has moved down the list. */

background: none;

margin-right: -10px;

text-decoration: none;

-webkit-transition: margin-right 1s;

-moz-transition: margin-right 1s;

-o-transition: margin-right 1s;

-ms-transition: margin-right 1s;

transition: margin-right 1s;

}

#nav li:hover ul a {

/* The persistent hover state does however create a global style for links even before they're hovered. Here we undo these effects. */

text-decoration: none;

width: 120px;

}

#nav li:hover ul li a:hover {

/* Here we define the most explicit hover states--what happens when you hover each individual link. */

background: #333;

width: 150px;

}

html缓慢下拉,html - 列表下拉导航-适用于除野生动物园之外的所有浏览器。 间隔开并缓慢 - 堆栈内存溢出...相关推荐

  1. python获取列表长度方法_python - 在Pandas df列中获取有关列表长度(平均长度,最大长度等)的统计信息的大多数pandas-onic方法 - 堆栈内存溢出...

    我想获取有关pandas df列中列表长度的统计信息,例如平均长度,最低,最高,标准差等. 例: import pandas as pd dfp = pd.DataFrame( {'trial_num ...

  2. python堆栈反向输出列表_python - IPython:将Python脚本的输出重定向到文件(如bash) - 堆栈内存溢出...

    IPython有自己的上下文管理器来捕获stdout / err ,但它没有重定向到文件,它重定向到一个对象: from IPython.utils import io with io.capture ...

  3. html下拉菜单的子目录,html - 带有下拉菜单的子菜单的垂直下拉菜单 - 堆栈内存溢出...

    我想用以下结构制作一个垂直下拉菜单(对于每个"按钮"一个不同的"下拉" div).这个想法是当我将"按钮"悬停时,"下拉" ...

  4. linux下mq通道的命令,linux - 从mq客户端运行Linux / MQSC命令 - 堆栈内存溢出

    我将一个远程队列管理器添加到我的WebSphere MQ客户端. 我完全不确定这意味着什么. MQ Explorer保留队列管理器定义的列表. MQ Client只是一个用于建立连接的库. 如果您的意 ...

  5. html对象下边框呈三角形,html5 - CSS-三角形边框无法正确呈现IE8 - 堆栈内存溢出...

    我有一个水平导航栏,在列表项的前面和之后插入了三角形边框,以使其看起来好像列表项的右侧有白色带边框的点. 它是在FF和Chrome中呈现的,而不是IE8,并且我使用的是html5 doctype,并且 ...

  6. linux下java调用python脚本,java - 在Linux Terminal中以编程方式从Java调用python脚本 - 堆栈内存溢出...

    我正在开发一个Java应用程序,用于检查源文件中的补丁程序(是否存在). 用于检测补丁程序更改的核心逻辑位于python脚本[titled'patch.py​​']中,并且我的Java应用程序与此Py ...

  7. Android消息向下堆积,android - 从CoordinatorLayout中的按钮单击事件触发NestedScroll折叠动作 - 堆栈内存溢出...

    我有一个CoordinatorLayout,它包含一个ViewPager,该控件使用嵌套的滚动行为可以正常滚动. 但是,我想在单击按钮时触发滚动/折叠行为. 如何通过单击按钮来控制这种崩溃行为. 通过 ...

  8. linux下虚拟lcd屏幕总线错误,mmap - 为什么BBB的LCD寄存器上的mmap()会导致总线错误? - 堆栈内存溢出...

    我试图在Beagle Bone Black上访问AM335X的LCD控制器. 我使用Linux debian. 下面是代码.如果我注释LCD代码部分中的" reg_value = * reg ...

  9. android定位数据在移动,android - 在我的Wi-Fi和移动数据关闭的情况下,是否可以仅通过GPS从经纬度获取地址? - 堆栈内存溢出...

    我正在测试一款在三星平板电脑中借助GPS进行纬度和经度的应用程序. 我能够从GPS单元捕获当前的纬度,经度. 现在,我想使用纬度经度从这些位置获取地址,而无需使用Internet即wi-fi,移动数据 ...

最新文章

  1. 海思全力部署智能城市NB-IoT应用
  2. sap 事务代码跳过权限检查
  3. 离散分布概率:几何分布、二项分布和泊松分布
  4. duilib入门问题集
  5. python读书笔记2000_流畅的Python读书笔记
  6. c# mysql 封装_C#简单通用的数据库连接封装
  7. win10+deepin双系统安装方法(UEFI+GPT)
  8. xp系统mysql安装教程视频教程_Windows XP操作系统下的MYSQL安装过程_PHP教程
  9. JAVA Swing GUI设计 WindowBuilder Pro Container使用大全7——JDesktopPane使用
  10. powershell快捷键_Windows10 PowerShell快捷键大全
  11. ubuntu16.04+Titan Xp的驱动官网上找不到
  12. pandas缺失数据处理
  13. Android CPU 深度睡眠,处理器的深度和深度睡眠状态之间的差异
  14. 电路设计之--滤波电容选取
  15. html制作古诗网页登高,杜甫登高古诗硬笔书法作品图片
  16. 支持查看朋友圈的微信Mac版客户端
  17. 数学基础----概率统计-----随机事件1
  18. 让你的努力配得上你的梦想书摘
  19. 拷贝构造函数的三种使用情况
  20. MySQL是怎么解决幻读问题的?

热门文章

  1. css没有border,你未必知道的CSS小知识:为什么没有人使用border-image
  2. html页面 wordpress,WordPress纯代码实现前端页面HTML完美压缩
  3. mysql事务总结_MySQL数据库和相关事务总结
  4. RT-Thread I2C设备驱动框架的对接使用
  5. windows 修改nginx端口号_分享Nginx搭建图片服务器简单实现
  6. linux系统安装佳能打印机驱动,在ubuntu16.04 64-bit上安装佳能打印机驱动Linux_UFRII_PrinterDriver_V320_us_EN...
  7. html5 php idea,五个HTML5新特性
  8. 设计模式C++实现(5)——桥接模式
  9. java codepointbefore_Java StringBuilder codePointBefore()方法与示例
  10. efishell无法开机shell_开机出现efi shell卡住不动了解决方法全集