小程序中input中圖標點擊事件

遇到的問題:

input後面的圖標點擊事件爲input的事件

解決問題:

<view class="top">

<input class="resarch" placeholder="輸入文章標題" type="text" placeholder-style="font-size:30rpx;color:#000000;" ></input>

</view>

<view class="resarch_image" catchtap="test" hover-stop-propagation="false">

<image src='../../image/resarch.png' style="width:100%;height:100%;display:inline;"></image>

</view>

.resarch{

width: 95%;

height: 80%;

border: 1px solid #eee;

padding-left: 3%;

border-radius: 15px;

}

.resarch_image{

height: 65rpx;

width: 10%;

/* margin-left: 87%; */

right: 0;

margin-right: 3%;

margin-top: -90rpx;

position: absolute;

z-index: 5;重點:position與z-index不可缺一

}

解決成功!!!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章