/*强调SCSS----------------------------------------*/标签:SCSS,控件,高亮,156,sg,emphasize,inputDom,253,emphasizeDom From: https://blog.51cto.com/u_15920212/5962654
[sg-emphasize],/deep/[sg-emphasize] {
animation: sg-emphasize .3s ease 3;
}
@keyframes sg-emphasize {
0% {
transform: scale(1);
background: rgba(3, 156, 253, 0);
}
50% {
transform: scale(.9);
background: rgba(3, 156, 253, 0.2);
}
100% {
transform: scale(1);
background: rgba(3, 156, 253, 0);
}
}
/*强调js----------------------------------------*/
function emphasizeFocus(emphasizeSel, focusSel) {
var emphasizeDom = document.querySelector(emphasizeSel);
var inputDom = focusSel ? document.querySelector(focusSel) : emphasizeDom;
emphasizeDom.setAttribute("sg-emphasize", true), setTimeout(() => emphasizeDom.removeAttribute("sg-emphasize"), 900);
inputDom.scrollIntoView({behavior: "smooth", block: "nearest", inline: "nearest"}), inputDom.focus();
}