This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <style> | |
| div {background-color: #dfd} | |
| span {background-color: #fbb} | |
| </style> | |
| <body> | |
| The checking the caret behaviour in <code>contenteditable</code>. The caret is placed with an offset of 1 and then moved backwards. It is checked whether the caret is still in the current sibling (return value 0) or has entered the previous sibling (return value 5). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <style> | |
| div {background-color: #dfd} | |
| span {background-color: #fbb} | |
| span:nth-child(even) {background-color: #ccf} | |
| input {width:90%; font-size: 11px} | |
| #editable:focus-within, .active {outline: 5px auto Highlight; | |
| outline: 5px auto -webkit-focus-ring-color; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <style> | |
| div {background-color: #dfd; width:300px;} | |
| span {background-color: #fbb;} | |
| span:nth-child(even) {background-color: #ccf;} | |
| input {width:90%; font-size: 11px;} | |
| </style> | |
| <body> | |
| Works good with firefox. Android chrome has another behaviour. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| </head> | |
| <style> | |
| li { | |
| display: block; | |
| padding: 0 2px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| </head> | |
| <style> | |
| li { | |
| display: block; | |
| padding: 0 2px; | |
| } |
NewerOlder