css & input type & search icon

css & input type & search icon

bug

740516-20190625093855097-1781980279.png

type="search"


    <input
        @input="autoSearch"
        @change="autoSearch"
        @click="addSearchHistory"
        ref="search-input"
        type="search"
        class="search-input"
        :placeholder="placeholder"
        v-model="input"
    />

OK

type="text" / type="input"


    <input
        @input="autoSearch"
        @change="autoSearch"
        @click="addSearchHistory"
        ref="search-input"
        type="input"
        class="search-input"
        :placeholder="placeholder"
        v-model="input"
    />

740516-20190625093804971-1219462656.png


.search-delete{
    position: absolute;
    display: block;
    top: 1rem;
    right: calc(1.38rem);
    width: .32rem;
    height: .32rem;
    border-radius: 50%;
    background: url("../../images/search/remove.svg") no-repeat center center;
    /* background: url("../../images/search/remove.svg") no-repeat center center fixed; */
    opacity: 1;
    /* background-color: transparent; */
}

css full background image

https://css-tricks.com/perfect-full-page-background-image/


html { 
  background: url(images/bg.jpg) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

.search-delete{
    position: absolute;
    display: block;
    top: 1rem;
    right: calc(1.38rem);
    width: .32rem;
    height: .32rem;
    border-radius: 50%;
    background: url("../../images/search/remove.svg") no-repeat center center;
    /* background: url("../../images/search/remove.svg") no-repeat center center fixed; */
    opacity: 1;
    /* background-color: transparent; */
}

css transparent background color

transparent, background, opacity


background-color: transparent;

https://cssreference.io/property/background-color/

https://stackoverflow.com/questions/11184117/transparent-css-background-color


.search-delete{
    position: absolute;
    display: block;
    top: 1rem;
    right: calc(1.38rem);
    width: .32rem;
    height: .32rem;
    border-radius: 50%;
    background: url("../../images/search/remove.svg");
    opacity: 1;
    /* background-color: transparent; */
}

转载于:https://www.cnblogs.com/xgqfrms/p/11080932.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值