html如何实现关键词搜索,使用JS实现关键词搜索时页面文本实时高亮

CSS

语言:

CSSSCSS

确定

@import url(https://fonts.googleapis.com/css?family=Lato:300);

body {

background: linear-gradient(to bottom, #222 0%, #2f2f2f 50%, #222 100%);

padding: 0;

margin: 0;

height: 100vh;

width: 100vw;

color: #fff8d6;

font-family: 'Lato', sans-serif;

line-height: 200%;

font-size: 24px;

display: flex;

align-items: center;

justify-content: center;

flex-direction: column;

}

blockquote {

width: 50%;

max-width: 1000px;

}

input {

background: #ff5500;

border: solid 1px #ffa76b;

padding: 10px;

font-family: 'Lato', sans-serif;

color: #fff8d6;

font-size: 32px;

width: 40%;

max-width: 800px;

}

input:focus {

outline: solid 1px #fff8d6;

}

input::-webkit-input-placeholder {

color: #ff9656;

}

input:-moz-placeholder {

/* Firefox 18- */

color: #ff9656;

}

input::-moz-placeholder {

/* Firefox 19+ */

color: #ff9656;

}

input:-ms-input-placeholder {

color: #ff9656;

}

span {

background: linear-gradient(to bottom, rgba(255, 85, 0, 0) 0%, rgba(255, 85, 0, 0) 45%, #ff5500 45%, #ff5500 75%, rgba(255, 85, 0, 0) 75%, rgba(255, 85, 0, 0) 100%);

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值