Answers for "html css add text to cursor"

CSS
3

Custom Cursor css

#custom-cursor {
  display: none;
  position: fixed;
  width: 20px;
  height: 20px;
  top: -10px;
  left: -10px;
  border: 2px solid black;
  border-radius: 50%;
  opacity: 1;
  background-color: #fb4d98;
  pointer-events: none;
  z-index: 99999999;
  transition: transform ease-out 0.15s, border 0.5s, opacity 0.5s, background-color 0.5s;
}

#custom-cursor.active {
  opacity: 0.5;
  background-color: #000;
  border: 2px solid #fb4d98;
}
Posted by: Guest on August-13-2021
0

how to control where the text cursor on div

function setCaret(row, col) {
    var el = document.getElementById("editable")
    var range = document.createRange()
    var sel = window.getSelection()
    
    range.setStart(el.childNodes[row - 1], col)
    range.collapse(true)
    
    sel.removeAllRanges()
    sel.addRange(range)
}
Posted by: Guest on February-10-2021

Browse Popular Code Answers by Language