cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


Save Automatically?

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.

              <div class="container">
		<a><svg height="150" width="150"> 
			<!-- First SVG path (i.e. artwork) -->
			<circle cx="75" cy="75" fill="lightgrey" r="50"></circle>
			<!-- 2nd named SVG path, used for both selected and hover states -->
			<circle id="outline" class="deselected" cx="75" cy="75" fill="white" fill-opacity=".01" r="50" stroke-width="2"></circle></
		<button class="button blue" onclick="toggleSelection()">Select/Deselect SVG</button>
  <p><i>n.b. Move pointer over SVG to trigger hover state</i></p>

              /*SVG styling*/

circle#outline {
	transition: all 0.25s;
circle#outline:hover {
	stroke: yellow;
	stroke-opacity: 1;
#outline.deselected {
	stroke-opacity: .01;
#outline.selected {
	stroke: black;

/*button styling*/

.center {
	text-align: center;
.button {
	background-color: rgb(14, 131, 205);
	border: 0;
	display: inline-block;
	cursor: pointer;
	color: #ffffff;
	font-family: Arial;
	font-size: 17px;
	padding: 16px 31px;
	text-decoration: none;
.button:hover {
	background-color: rgba(14, 131, 205, .9);
.button:active {
	position: relative;
	top: 1px;
.container {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
*:focus {
	outline: none
p {
  font-family: Arial;
              function toggleSelection() {
  var myButtonClasses = document.getElementById("outline").classList;

  if (myButtonClasses.contains("selected")) {
  } else {
    if (myButtonClasses.contains("deselected")) {
  } else {
Loading ..................