Jump to content

text highlighting (Подсветка текста)


qpash

Recommended Posts

HI!

How to make text highlighting when hovering the mouse over a component by means of JS?

Need for unilabel, unicheckbox and uniradiobutton.

 

Как сделать подсветку текста при наведении мыши на компонент средствами JS?

Нужно для unilabel, unicheckbox and uniradiobutton

 

Use licensed version

Version:1.50.0 build 1479

Link to comment
Share on other sites

Мне нужно средствами CSS. Пытаюсь сделать плавное подчеркивание и смена цвета текста - не работает в GUI,

хотя в редакторе работает нормально ( пробовал тут https://codepen.io/pen )

 

HTML:

<p class="fun-hover"><b>TEST STRING</b></p>

 

CSS:

.fun-hover { 
  background-image: -webkit-linear-gradient(left, transparent 65%, complement(#00aeff) 80%);
  background-image: linear-gradient(to bottom, transparent 65%, complement(#00aeff) 80%);
  background-position: 150;
  background-size: 200%;
  -webkit-transition: all 0.4s;
  transition: all 0.4s;
  color: black;
  }
.fun-hover:hover {
  background-position: -100%;
  color: complement(#00aeff);
}
Link to comment
Share on other sites

 

Мне нужно средствами CSS. Пытаюсь сделать плавное подчеркивание и смена цвета текста - не работает в GUI,

хотя в редакторе работает нормально ( пробовал тут https://codepen.io/pen )

 

HTML:

<p class="fun-hover"><b>TEST STRING</b></p>

 

CSS:

.fun-hover { 
  background-image: -webkit-linear-gradient(left, transparent 65%, complement(#00aeff) 80%);
  background-image: linear-gradient(to bottom, transparent 65%, complement(#00aeff) 80%);
  background-position: 150;
  background-size: 200%;
  -webkit-transition: all 0.4s;
  transition: all 0.4s;
  color: black;
  }
.fun-hover:hover {
  background-position: -100%;
  color: complement(#00aeff);
}

 

 

Какой браузер используете ?

Link to comment
Share on other sites

Единственное что не получилось в этом коде, чтобы цвет самого текста менялся, если есть мысли - подскажите. Вот полный рабочий код CSS (без цвета текста)

.fun-hover { 
  background-image: linear-gradient(to bottom, transparent 100%, #18BC9C 100%);
  background-position: 150;
  background-size:200%;
  -webkit-transition: all 0.4s;
  transition: all 0.4s;
  }
.fun-hover:hover {
  background-position: -100%;
  background-image: linear-gradient(to bottom, transparent 0%, #18BC9C 80%);
}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...