最近又发现了一个IE和其他浏览器的不同点,IE中,<a></a>中无内容时,无法点击跳转,真是虐死我了,没想到下面这样写也会有兼容性,看来我要学的真的很多。

<div id="one" style="position:relative;">
<img src="http://imgad0.pcauto.com.cn/ivy/image/201511/3/14465527591550.jpg" />
<a href="http://baidu.com.cn" style="position:absolute;display:inline-block;width:125px;height:22px;top:0px;left:0px;"></a>
</div>

正确的写法是:

<div id="one" style="position:relative;">
<a href="http://baidu.com.cn" style="display:inline-block;width:125px;height:22px;top:0px;left:0px;"><img src="http://imgad0.pcauto.com.cn/ivy/image/201511/3/14465527591550.jpg" /></a>
</div>

IE下a标签跳转失败的更多相关文章

  1. Linux下运行memcached失败

    Linux下运行memcached失败 1.错误信息如下 [root@localhost ~]# memcached can't run as root without the -u switch 2 ...

  2. cfile fopen fopen_s win10下打开文件失败

    vc程序在win10下面使用fopen 打开文件失败,在网上查 了下是因为UAC权限的问题如下: 由于windows vista win7 win8 win 10 添加了UAC权限,所以会导致 在系统 ...

  3. windows下redis启动失败提示maxheap flag

    windows下redis启动失败 D:\redis>redis-server.exe redis.conf [] Oct ::39.789 # The Windows version of R ...

  4. redhat5.8下oracle11g启动失败

    # redhat5.8下oracle11g启动失败 ### 日志文件路径-----------------------------tail -f /u01/app/oracle/product/11. ...

  5. [转帖]Linux /tmp目录下执行脚本失败提示Permission denied

    Linux /tmp目录下执行脚本失败提示Permission denied https://www.cnblogs.com/linyfeng/p/11087655.html 国产化的环境上 就有一个 ...

  6. win下sass安装失败的一种可能

    首先声明,本篇转自CSDN的LZGS_4. 今天我也遇到这个问题,就把文章擅自转载了,方便自己也方便更多的人吧. 因为sass和compass依赖于ruby环境,所以装之前先确认装了ruby.可到官网 ...

  7. 怎么找到占用usb的模块,linux下Jlink连接失败

    问题是这样产生的,我在linux下安装jlink,启动JLinkExe执行,总是提示不能通过usb连接: SEGGER J-Link Commander V5.10q (Compiled Mar :: ...

  8. 曲演杂坛--SQLCMD下执行命令失败但没有任何错误提示的坑

    今天使用SQLCMD导入到SQL SERVER数据库中,看着数据文件都成功执行,但是意外发现有一个文件数据没有成功导入,但执行不报错,很容易导致问题被忽略. 使用存在问题的文件做下测试,从界面上看几行 ...

  9. windows下postgresql安装失败解决方法:无法运行getlocales.exe

    今天要安装postgresql但是安装的时候出现错误 Unknown error while running C:\Users\jinjin\AppData\Local\Temp\postgresql ...

随机推荐

  1. linux常用经典命令

    1.查看cpu # 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数   # 查看物理CPU个数 #物理cpu个数 ...

  2. php截取字符串

    1.substr(源字符串,其实位置[,长度])-截取字符串返回部分字符串 <?php $str ="phpddt.com"; echo substr($str, 2); / ...

  3. JQuery兼容IE6问题汇总(不断更新)

    兼容IE6真是苦逼的差事,无奈中... 逗号的问题:IE6中要去掉最后的逗号 var o={ id:1, Name:"abc", //这里的逗号一定要去掉 } HTML的结构,由于 ...

  4. lua module环境探秘

    module 作用 module (name [, ···]) Creates a module. If there is a table in package.loaded[name], this ...

  5. Mysql数据库优化

    to be add... --------------------------------------------------------------------------------------- ...

  6. Quartz.NET

    http://www.360doc.com/userhome.aspx?userid=11741424&cid=2#

  7. Leetcode: Nested List Weight Sum II

    Given a nested list of integers, return the sum of all integers in the list weighted by their depth. ...

  8. .NET中通過OUTLOOK發送附件內容

    最近碰到一個發送郵件附件的問題,隨便幾下來,方便以後學習. string[] files = System.IO.Directory.GetFiles(@"~/UploadData" ...

  9. MyEclipse启动慢的办法

    禁用myeclipse updating indexes MyEclipse 总是不停的在 Update index,研究发现Update index...是Maven在下载更新,但很是影响myecl ...

  10. C# 字符串string类型转换成DateTime类型 或者 string转换成DateTime?(字符串转换成可空日期类型)

    在c#中,string类型转换成DateTime类型是经常用到的,作为基本的知识,这里在此做个小结.一般来说可以使用多种方法进行转换,最常用的就是使用Convert.ToDateTime(string ...