我的div不可点击

时间:2016-01-27 06:34:15

标签: html css

我希望我的div可以点击。但我已经测试了多种可能的方法,但它并没有正常工作:

## a list for storing properly formated dataframes
container=[]
for l in letters:

    ## loop through list of dicts, turn each into a dataframe
    ## then add `order` to the index. Then make the dataframe wide using unstack
    temp = pd.DataFrame(data=l).set_index('order',append=True).unstack(level=[0])
    container.append(temp)

## throw all the dataframes together into one
result = pd.concat(container).reset_index()
result

  order   char             
          case glyph  vowel
0     1  upper     A   True
1     2  upper     B  False
2     3  upper     C  False
3     4  lower     d  False
4     5  lower     e   True

2 个答案:

答案 0 :(得分:1)

您的html错误请习惯此

并定义您的a代码display inline-block;

a{display:inline-block;vertical-align:top;}
<a href="https://www.telegram.me/shadyab_deal">
     <div  id="mob_link" class="home_right_banner_mob">
        <img width="360px" height="130px" src="http://www.shadyab.com/assests/images/ic_mob_telegram.jpg"/>
     </div>
     </a>

第二个选项您可以使用此有效的 HTML

    #mob_link a{display:block;}
 <div  id="mob_link" class="home_right_banner_mob">
    <a href="https://www.telegram.me/shadyab_deal">
            <img width="360px" height="130px" src="http://www.shadyab.com/assests/images/ic_mob_telegram.jpg"/>
    </a>
         </div>

答案 1 :(得分:0)

在HTML 5中允许使用链接包装块级元素。只需执行此操作。

<a href="https://www.telegram.me/shadyab_deal">
 <div  id="mob_link" class="home_right_banner_mob">
     <img width="360px" height="130px" src="http://www.shadyab.com/assests/images/ic_mob_telegram.jpg"/>
 </div>
 </a>