Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <p>
  Drag the following link to your Bookmarks bar to create a bookmarklet to change your cursor to 24 pixel circle for testing the proposed WCAG 2.2 Target Size requirement (ref: <a href="https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html" target="_top">Understanding Success Criterion 2.5.8: Target Size (Minimum)</a>).
</p>
 
<ul>
  <li><a href="javascript:(function(){var d=document,id='AAR24pxBkmklt1',el=d.getElementById(id),f=d.querySelectorAll('iframe'),i=0,l=f.length;if(el){function removeFromShadows(root){for(var el of root.querySelectorAll('*')){if(el.shadowRoot){el.shadowRoot.getElementById(id).remove();removeFromShadows(el.shadowRoot);}}}el.remove();if(l){for(i=0;i<l;i++){try{f[i].contentWindow.document.getElementById(id).remove();removeFromShadows(f[i].contentWindow.document);}catch(e){console.log(e)}}}removeFromShadows(d);}else{s=d.createElement('style');s.id=id;s.appendChild(d.createTextNode(%27*{ cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAS1BMVEUAAAAAAAD+/v4AAABRUVE/Pz/u7u74+Pi6urrS0tJ8fHwAAAAAAAD///////8AAAD///////8AAAAAAAD////////////+/v7////mqvA4AAAAGHRSTlMA/vq59/Tx7+3p5uXV0L+okoFrZE1DFvCfRm9hAAAAnElEQVQoz3WSWRKEIAxEQ9hXURa5/0lnxpHS0kp/kX5AIAmcKtyzrzwvcNcWhFE4Biojwnb5i7QYc+295ohWLtPnTqc2g5a04+d+t69w07q748wm9fQn0fKXJ9gEDyUbAIrA9gQNRQFu4owZm6toOHiV3yArDwzrG1RkwEb/u4dO1gcNyKvI5ORzyQ9SJSGLSJWdbBTdWnoYyPH5AN6eCUUIphirAAAAAElFTkSuQmCC) 12 12, auto !important}%27));function applyToShadows(root){for(var el of root.querySelectorAll('*')){if(el.shadowRoot){el.shadowRoot.appendChild(s.cloneNode(true));applyToShadows(el.shadowRoot);}}}d.getElementsByTagName('head')[0].appendChild(s);for(i=0;i<l;i++){try{f[i].contentWindow.document.getElementsByTagName('head')[0].appendChild(s.cloneNode(true));applyToShadows(f[i].contentWindow.document);}catch(e){console.log(e)}}applyToShadows(d);}})();">24px Circle Cursor</a></li>
</ul>
<p>
  If you are on a totally sweet high-end display, then grab one of these SVG circle cursors:
</p>
<ul>
  <li><a href="javascript:(function(){var d=document,id='AAR24pxBkmklt2',el=d.getElementById(id),f=d.querySelectorAll('iframe'),i=0,l=f.length;if(el){function removeFromShadows(root){for(var el of root.querySelectorAll('*')){if(el.shadowRoot){el.shadowRoot.getElementById(id).remove();removeFromShadows(el.shadowRoot);}}}el.remove();if(l){for(i=0;i<l;i++){try{f[i].contentWindow.document.getElementById(id).remove();removeFromShadows(f[i].contentWindow.document);}catch(e){console.log(e)}}}removeFromShadows(d);}else{s=d.createElement('style');s.id=id;s.appendChild(d.createTextNode(%27*{ cursor: url(&quot;data:image/svg+xml,%253Csvg viewBox=\&#39;0 0 24 24\&#39; width=\&#39;24\&#39; height=\&#39;24\&#39; xmlns=\&#39;http://www.w3.org/2000/svg\&#39;%253E%253Ccircle cx=\&#39;50%2525\&#39; cy=\&#39;50%2525\&#39; r=\&#39;11.5\&#39; fill=\&#39;none\&#39; stroke=\&#39;%2523000\&#39; stroke-width=\&#39;1\&#39;/%253E%253Ccircle cx=\&#39;50%2525\&#39; cy=\&#39;50%2525\&#39; r=\&#39;10.5\&#39; fill=\&#39;none\&#39; stroke=\&#39;%2523fff\&#39; stroke-width=\&#39;1\&#39;/%253E%253Cline x1=\&#39;30%2525\&#39; y1=\&#39;50%2525\&#39; x2=\&#39;70%2525\&#39; y2=\&#39;50%2525\&#39; stroke=\&#39;%2523000\&#39; stroke-width=\&#39;2\&#39;/%253E%253Cline x1=\&#39;50%2525\&#39; y1=\&#39;30%2525\&#39; x2=\&#39;50%2525\&#39; y2=\&#39;70%2525\&#39; stroke=\&#39;%2523000\&#39; stroke-width=\&#39;2\&#39;/%253E%253C/svg%253E&quot;) 12 12, auto !important}%27));function applyToShadows(root){for(var el of root.querySelectorAll('*')){if(el.shadowRoot){el.shadowRoot.appendChild(s.cloneNode(true));applyToShadows(el.shadowRoot);}}}d.getElementsByTagName('head')[0].appendChild(s);for(i=0;i<l;i++){try{f[i].contentWindow.document.getElementsByTagName('head')[0].appendChild(s.cloneNode(true));applyToShadows(f[i].contentWindow.document);}catch(e){console.log(e)}}applyToShadows(d);}})();">24px SVG Circle Cursor</a></li>
  <li><a href="javascript:(function(){var d=document,id='AAR24pxBkmklt3',el=d.getElementById(id),f=d.querySelectorAll('iframe'),i=0,l=f.length;if(el){function removeFromShadows(root){for(var el of root.querySelectorAll('*')){if(el.shadowRoot){el.shadowRoot.getElementById(id).remove();removeFromShadows(el.shadowRoot);}}}el.remove();if(l){for(i=0;i<l;i++){try{f[i].contentWindow.document.getElementById(id).remove();removeFromShadows(f[i].contentWindow.document);}catch(e){console.log(e)}}}removeFromShadows(d);}else{s=d.createElement('style');s.id=id;s.appendChild(d.createTextNode(%27*{ cursor: url(&quot;data:image/svg+xml,%253Csvg viewBox=\&#39;0 0 24 24\&#39; width=\&#39;24\&#39; height=\&#39;24\&#39; xmlns=\&#39;http://www.w3.org/2000/svg\&#39;%253E%253Ccircle cx=\&#39;50%2525\&#39; cy=\&#39;50%2525\&#39; r=\&#39;11.5\&#39; fill=\&#39;none\&#39; stroke=\&#39;%2523000\&#39; stroke-width=\&#39;1\&#39;/%253E%253Ccircle cx=\&#39;50%2525\&#39; cy=\&#39;50%2525\&#39; r=\&#39;10.5\&#39; fill=\&#39;none\&#39; stroke=\&#39;%2523ff0\&#39; stroke-width=\&#39;1\&#39;/%253E%253Cline x1=\&#39;7\&#39; y1=\&#39;11.5\&#39; x2=\&#39;12\&#39; y2=\&#39;11.5\&#39; stroke=\&#39;%2523ff0\&#39; stroke-width=\&#39;1\&#39;/%253E%253Cline x1=\&#39;12\&#39; y1=\&#39;11.5\&#39; x2=\&#39;17\&#39; y2=\&#39;11.5\&#39; stroke=\&#39;%2523000\&#39; stroke-width=\&#39;1\&#39;/%253E%253Cline x1=\&#39;7\&#39; y1=\&#39;12.5\&#39; x2=\&#39;12\&#39; y2=\&#39;12.5\&#39; stroke=\&#39;%2523000\&#39; stroke-width=\&#39;1\&#39;/%253E%253Cline x1=\&#39;12\&#39; y1=\&#39;12.5\&#39; x2=\&#39;17\&#39; y2=\&#39;12.5\&#39; stroke=\&#39;%2523ff0\&#39; stroke-width=\&#39;1\&#39;/%253E%253Cline x1=\&#39;11.5\&#39; y1=\&#39;7\&#39; x2=\&#39;11.5\&#39; y2=\&#39;12\&#39; stroke=\&#39;%2523ff0\&#39; stroke-width=\&#39;1\&#39;/%253E%253Cline x1=\&#39;11.5\&#39; y1=\&#39;12\&#39; x2=\&#39;11.5\&#39; y2=\&#39;17\&#39; stroke=\&#39;%2523000\&#39; stroke-width=\&#39;1\&#39;/%253E%253Cline x1=\&#39;12.5\&#39; y1=\&#39;7\&#39; x2=\&#39;12.5\&#39; y2=\&#39;12\&#39; stroke=\&#39;%2523000\&#39; stroke-width=\&#39;1\&#39;/%253E%253Cline x1=\&#39;12.5\&#39; y1=\&#39;12\&#39; x2=\&#39;12.5\&#39; y2=\&#39;17\&#39; stroke=\&#39;%2523ff0\&#39; stroke-width=\&#39;1\&#39;/%253E%253C/svg%253E&quot;) 12 12, auto !important}%27));function applyToShadows(root){for(var el of root.querySelectorAll('*')){if(el.shadowRoot){el.shadowRoot.appendChild(s.cloneNode(true));applyToShadows(el.shadowRoot);}}}d.getElementsByTagName('head')[0].appendChild(s);for(i=0;i<l;i++){try{f[i].contentWindow.document.getElementsByTagName('head')[0].appendChild(s.cloneNode(true));applyToShadows(f[i].contentWindow.document);}catch(e){console.log(e)}}applyToShadows(d);}})();">24px SVG Circle Cursor v2</a></li>
    <li><a href="javascript:(function(){var d=document,id='AAR24pxBkmklt4',el=d.getElementById(id),f=d.querySelectorAll('iframe'),i=0,l=f.length;if(el){function removeFromShadows(root){for(var el of root.querySelectorAll('*')){if(el.shadowRoot){el.shadowRoot.getElementById(id).remove();removeFromShadows(el.shadowRoot);}}}el.remove();if(l){for(i=0;i<l;i++){try{f[i].contentWindow.document.getElementById(id).remove();removeFromShadows(f[i].contentWindow.document);}catch(e){console.log(e)}}}removeFromShadows(d);}else{s=d.createElement('style');s.id=id;s.appendChild(d.createTextNode(%27*{ cursor: url(&quot;data:image/svg+xml,%253Csvg viewBox=\&#39;0 0 24 24\&#39; width=\&#39;24\&#39; height=\&#39;24\&#39; xmlns=\&#39;http://www.w3.org/2000/svg\&#39;%253E%253Cdefs%253E%253CclipPath id=\&#39;TopRight\&#39;%253E%253Crect x=\&#39;12\&#39; y=\&#39;0\&#39; width=\&#39;12\&#39; height=\&#39;12\&#39; /%253E%253C/clipPath%253E%253CclipPath id=\&#39;TopLeft\&#39;%253E%253Crect x=\&#39;0\&#39; y=\&#39;0\&#39; width=\&#39;12\&#39; height=\&#39;12\&#39; /%253E%253C/clipPath%253E%253CclipPath id=\&#39;BottomLeft\&#39;%253E%253Crect x=\&#39;0\&#39; y=\&#39;12\&#39; width=\&#39;12\&#39; height=\&#39;12\&#39; /%253E%253C/clipPath%253E%253CclipPath id=\&#39;BottomRight\&#39;%253E%253Crect x=\&#39;12\&#39; y=\&#39;12\&#39; width=\&#39;12\&#39; height=\&#39;12\&#39; /%253E%253C/clipPath%253E%253C/defs%253E%253Ccircle cx=\&#39;50%2525\&#39; cy=\&#39;50%2525\&#39; r=\&#39;11.5\&#39; fill=\&#39;%25230008\&#39; stroke=\&#39;%2523000\&#39; stroke-width=\&#39;1\&#39; clip-path=\&#39;url(%2523TopRight)\&#39;/%253E%253Ccircle cx=\&#39;50%2525\&#39; cy=\&#39;50%2525\&#39; r=\&#39;11.5\&#39; fill=\&#39;%25230008\&#39; stroke=\&#39;%2523000\&#39; stroke-width=\&#39;1\&#39; clip-path=\&#39;url(%2523BottomLeft)\&#39;/%253E%253Ccircle cx=\&#39;50%2525\&#39; cy=\&#39;50%2525\&#39; r=\&#39;11.5\&#39; fill=\&#39;%2523fff8\&#39; stroke=\&#39;%2523fff\&#39; stroke-width=\&#39;1\&#39; clip-path=\&#39;url(%2523TopLeft)\&#39;/%253E%253Ccircle cx=\&#39;50%2525\&#39; cy=\&#39;50%2525\&#39; r=\&#39;11.5\&#39; fill=\&#39;%2523fff8\&#39; stroke=\&#39;%2523fff\&#39; stroke-width=\&#39;1\&#39; clip-path=\&#39;url(%2523BottomRight)\&#39;/%253E%253C/svg%253E&quot;) 12 12, auto !important}%27));function applyToShadows(root){for(var el of root.querySelectorAll('*')){if(el.shadowRoot){el.shadowRoot.appendChild(s.cloneNode(true));applyToShadows(el.shadowRoot);}}}d.getElementsByTagName('head')[0].appendChild(s);for(i=0;i<l;i++){try{f[i].contentWindow.document.getElementsByTagName('head')[0].appendChild(s.cloneNode(true));applyToShadows(f[i].contentWindow.document);}catch(e){console.log(e)}}applyToShadows(d);}})();">24px SVG Circle Cursor v3</a></li>
</ul>
<p>
  Note that the new SC is still in flux and as I predicted last year is no longer a square. Follow the <a href="https://github.com/w3c/wcag/issues?q=is%3Aissue+is%3Aopen+label%3A%222.5.8+Target+Size+%28Min%29%22" target="_top">GitHub discussions</a> for updates.
</p>
<p>
  This is a fork of my <a href="https://codepen.io/aardrian/pen/eYyjNVg" target="_top">square 24x24 bookmarklet</a>, which was an improvement of my <a href="https://codepen.io/aardrian/pen/eYZWNyv" target="_top">44×44 bookmarklet</a> (which was based on Jared Smith's <a href="https://codepen.io/jared_w_smith/pen/vYGXeMy" target="_top">44x44 bookmark</a>). To remove the cursor, activate the bookmarklet again. Thanks to Pat for the suggestion to adapt his own <a href="https://codepen.io/patrickhlauke/pen/PopGBdE" target="_top">focus outline bookmarklet</a> (adapted from Steve's <a href="https://codepen.io/stevef/pen/YLMqbo" target="_top">text spacing bookmarklet</a> from work by Pat and Jon Gibbins) which allowed it to toggle on and off and to work in one level of nested iframes. Sadly, the iframe nesting bit no longer seems to work:
</p>
<iframe></iframe>
<p>
  Note your browser's Content Security Policy may prevent the script from modifying a page, in which case you can run it in the browser console. In Firefox use <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>K</kbd>, In Chrome use <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>J</kbd>.
</p>

<div id="Test">
  <p>Testing area?</p>
</div>
              
            
!

CSS

              
                body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
  /*   line-height: 1.5; */
  /*   letter-spacing: 0.12em; */
  /*   word-spacing: 0.16em; */
}

iframe {
  width: 90vw;
  height: 4em;
}

#Test {
  background-image: linear-gradient(135deg, #ccc 25%, #000000 25%, #000000 50%, #ccc 50%, #ccc 75%, #000000 75%, #000000 100%);
background-size: 135px 135px;
  width: 90vw;
  height: 20vh;
}

#Test p {
  background-color: #fff;
  color: #000;
  display: inline-block;
  padding: 1em 2em;
  margin: 0;
}
              
            
!

JS

              
                // document.onkeydown = function(evt) {
//   evt = evt || window.event;
//   var isEscape = false;
//   if ("key" in evt) {
//     isEscape = evt.key == "Escape" || evt.key == "Esc";
//   } else {
//     isEscape = evt.keyCode == 27;
//   }
//   if (isEscape) {
//     var a=document.createElement('style'),b;
//     document.head.appendChild(a);
//     b=a.sheet;
//     b.insertRule('*{cursor:revert !important}',0);
//   }
// };

// document.onkeydown=function(e){var n;("key"in(e=e||window.event)?"Escape"==e.key||"Esc"==e.key:27==e.keyCode)&&(n=document.createElement("style"),document.head.appendChild(n),n.sheet.insertRule("*{cursor:revert !important}",0))};
              
            
!
999px

Console