css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <h1>[Demo] Widget Settings</h1>
<ul class="demo-settings">
	<li>
		<b>Style Type</b>
		<label><input type="radio" name="type" checked onclick="$('.mmt-widget-content').attr('data-style','city-listed');"> city-listed</label>
		<label><input type="radio" name="type" onclick="$('.mmt-widget-content').attr('data-style','image');"> image</label>
		<label><input type="radio" name="type" onclick="$('.mmt-widget-content').attr('data-style','youtube');"> youtube</label>
	</li>
	<li>
		<b>Theme</b>
		<label><input type="radio" name="theme" checked onclick="$('#mmt-widget').removeClass('light').addClass('dark');"> dark</label>
		<label><input type="radio" name="theme" onclick="$('#mmt-widget').removeClass('dark').addClass('light');"> light</label>
	</li>
	<li>
		<b>Position</b>
		<label><input type="radio" name="position" checked onclick="$('#mmt-widget').removeClass('left').addClass('right');"> right bottom</label>
		<label><input type="radio" name="position" onclick="$('#mmt-widget').removeClass('right').addClass('left');"> left bottom</label>
	</li>
</ul>




<!-- ------------------ Widget Markup ------------------ -->
<div id="mmt-widget" class="mmt-widget-wrapper right dark">
	<svg id="mmt-widget-close" class="mmt-widget-close" width="32px" height="32px" viewBox="-9 -9 32 32" xmlns="http://www.w3.org/2000/svg">
		<g>
			<path d="M14.3721736,13.8472912 L0,0"></path>
			<path d="M0,13.6118055 L13.6118055,0"></path>
		</g>
	</svg>

	<div id="mmt-widget-top-border" class="mmt-widget-top-border"></div>

	<div class="mmt-widget-content" data-style="city-listed">
		<div class="city-listed-style">
			<p class="title">Hot Cities</p>
			<ul class="city-list">
				<li class="city-item">
					<a href="javascript:;" target="_blank">
						<span class="num">1</span>
						<span class="city-name">Paris, France</span>
						<svg class="ico-go" width="48" height="48" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M20 12l-2.83 2.83 9.17 9.17-9.17 9.17 2.83 2.83 12-12z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>
					</a>
				</li>
				<li class="city-item">
					<a href="javascript:;" target="_blank">
						<span class="num">2</span>
						<span class="city-name">Seoul, South Korea</span>
						<svg class="ico-go" width="48" height="48" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M20 12l-2.83 2.83 9.17 9.17-9.17 9.17 2.83 2.83 12-12z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>
					</a>
				</li>
				<li class="city-item">
					<a href="javascript:;" target="_blank">
						<span class="num">3</span>
						<span class="city-name">New York City, United State</span>
						<svg class="ico-go" width="48" height="48" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M20 12l-2.83 2.83 9.17 9.17-9.17 9.17 2.83 2.83 12-12z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>
					</a>
				</li>
			</ul>
		</div>
		<div class="image-style"></div>
		<iframe class="youtube-style" width="300" height="164" src="https://www.youtube.com/embed/6WbxAwvtaCg?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>

		<div class="search-box">
			<div class="search-field">
				<svg class="ico-search" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
					<path d="M22.4,19.6l-4.8-4.8c0.9-1.4,1.4-3,1.4-4.8c0-5-4-9-9-9s-9,4-9,9s4,9,9,9c1.8,0,3.4-0.5,4.8-1.4l4.8,4.8   c0.4,0.4,0.9,0.6,1.4,0.6c1.1,0,2-0.9,2-2C23,20.4,22.8,19.9,22.4,19.6z M5,10c0-2.8,2.2-5,5-5s5,2.2,5,5s-2.2,5-5,5S5,12.8,5,10z"/>
				</svg>
				<input class="search-input" type="text" placeholder="Search your city" value="Seoul, South Korea">
			</div>
			<div class="search-drop hidden">
				<ul class="result-list">
					<li class="result-item">Se</li>
					<li class="result-item">Seou</li>
					<li class="result-item">Seoul</li>
				</ul>
				<p class="no-results hidden" data-spinner="true">No Results</p>
			</div>
		</div>

		<button class="btn">REQUEST MY CITY</button>
	</div>

	<div class="mmt-widget-bar">
		<div id="mmt-widget-bar-content" class="mmt-widget-bar-content">
			<p class="artist-name">코로나(corona)</p>
			<p class="description">Tell us where to tour next!</p>
		</div>
		<div id="mmt-widget-artist-img" class="artist-img" style="background-image: url('https://productionmedia.mymusictaste.com/cache/08/d9/08d9f267a3e75a644416cb420ed9c484.jpg')"></div>
	</div>
</div>
<!-- ------------------ Widget Markup ------------------ -->
            
          
!
            
              /* style for demo page */
body {
  min-height: 700px;
  background: #f5f5f5;
  font-family: 'Roboto';
}
.demo-settings li {
  margin-bottom: 10px;
  padding: 5px 0;
}
.demo-settings label {
  margin-right: 15px;
}
.demo-settings b {
  display: block;
  margin-bottom: 5px;
  width: 100px;
}


/* style.sass
 * Created by Hyejin (HJ) on 2017/07/26
 */
/* _config.sass
 * Created by Hyejin (HJ) on 2017/07/26
 */
@import url(https://fonts.googleapis.com/css?family=Roboto:300,300italic,400,400italic,700);
@import url(https://fonts.googleapis.com/earlyaccess/notosanskr.css);
/* widget.sass (Widget CSS entry point).
 * Created by Hyejin (HJ) on 2017/07/26
 */
.mmt-widget-wrapper {
  position: fixed;
  display: block;
  width: 300px;
  border-radius: 8px;
  font-family: "Roboto", "Noto Sans KR", sans-serif;
  font-style: normal;
  font-weight: normal;
  line-height: normal;
  letter-spacing: normal;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  z-index: 99999; }
  .mmt-widget-wrapper * {
    box-sizing: content-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; }
  .mmt-widget-wrapper .hidden {
    display: none !important; }
  .mmt-widget-wrapper ul {
    list-style: none; }
  .mmt-widget-wrapper a, .mmt-widget-wrapper a:focus, .mmt-widget-wrapper a:visited, .mmt-widget-wrapper a:link {
    color: inherit;
    text-decoration: none; }
  .mmt-widget-wrapper.light {
    background-color: #fff;
    color: #212121; }
    .mmt-widget-wrapper.light .artist-img {
      border: 4px solid #fff;
      background-color: #fff; }
    .mmt-widget-wrapper.light .city-item {
      border-bottom: 1px dashed #b3b3b3;
      cursor: pointer; }
    .mmt-widget-wrapper.light .search-input {
      border: none;
      border-bottom: 2px solid #212121;
      color: #212121; }
    .mmt-widget-wrapper.light .ico-go,
    .mmt-widget-wrapper.light .ico-search {
      fill: #212121; }
    .mmt-widget-wrapper.light .mmt-widget-close {
      background: rgba(255, 255, 255, 0.5);
      stroke: #212121; }
  .mmt-widget-wrapper.dark {
    background-color: #212121;
    color: #fff; }
    .mmt-widget-wrapper.dark .artist-img {
      border: 4px solid #212121;
      background-color: #212121; }
    .mmt-widget-wrapper.dark .city-item {
      border-bottom: 1px dashed #6e6e6e; }
    .mmt-widget-wrapper.dark .search-input {
      border: none;
      border-bottom: 2px solid #fff;
      color: #fff; }
    .mmt-widget-wrapper.dark .ico-go,
    .mmt-widget-wrapper.dark .ico-search {
      fill: #fff; }
    .mmt-widget-wrapper.dark .mmt-widget-close {
      background: rgba(33, 33, 33, 0.5);
      stroke: #fff; }
  .mmt-widget-wrapper.left {
    bottom: 20px;
    left: 10px; }
    .mmt-widget-wrapper.left .mmt-widget-bar-content {
      padding: 12px 16px 12px 96px; }
    .mmt-widget-wrapper.left .artist-img {
      left: 4px; }
  .mmt-widget-wrapper.right {
    bottom: 20px;
    right: 10px; }
    .mmt-widget-wrapper.right .mmt-widget-bar-content {
      padding: 12px 96px 12px 16px; }
    .mmt-widget-wrapper.right .artist-img {
      right: 4px; }
  .mmt-widget-wrapper.expand .mmt-widget-close {
    display: block; }
  .mmt-widget-wrapper.expand .mmt-widget-top-border {
    height: 8px;
    background: linear-gradient(to right, #01c9ca 0%, #3886ff 100%);
    -webkit-animation: none;
    animation: none; }
  .mmt-widget-wrapper.expand .mmt-widget-content {
    max-height: 320px;
    animation: overflow 0s 0.35s 1 forwards; }
  .mmt-widget-wrapper.expand.light .mmt-widget-content {
    border-bottom: 1px solid #f2f2f2; }
  .mmt-widget-wrapper.expand.dark .mmt-widget-content {
    border-bottom: 1px solid #2e2e2e; }
  .mmt-widget-wrapper.shrink {
    width: 0;
    background-color: transparent;
    box-shadow: none; }
    .mmt-widget-wrapper.shrink .mmt-widget-content,
    .mmt-widget-wrapper.shrink .mmt-widget-bar-content {
      height: 0;
      overflow: hidden; }
    .mmt-widget-wrapper.shrink .mmt-widget-top-border {
      position: absolute;
      top: -13px;
      width: 88px;
      height: 88px;
      border-radius: 50%;
      background: linear-gradient(to top, rgba(56, 134, 255, 0.8) 0%, rgba(1, 201, 202, 0.8) 20%);
      box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
      -webkit-animation: shrink-border-effect 1.5s linear infinite forwards;
      animation: shrink-border-effect 1.5s linear infinite forwards; }
      .mmt-widget-wrapper.shrink .mmt-widget-top-border:before {
        content: "";
        position: absolute;
        top: 2px;
        left: 0;
        right: 0;
        display: block;
        margin: 0 auto;
        width: calc(100% - 4px);
        height: calc(100% - 4px);
        border-radius: 50%;
        background-color: #fff; }
    .mmt-widget-wrapper.shrink .artist-img {
      border: none;
      box-shadow: none; }
    .mmt-widget-wrapper.shrink.left .mmt-widget-top-border {
      left: 4px; }
    .mmt-widget-wrapper.shrink.left .artist-img {
      left: 8px; }
    .mmt-widget-wrapper.shrink.right .mmt-widget-top-border {
      right: 4px; }
    .mmt-widget-wrapper.shrink.right .artist-img {
      right: 8px; }
  .mmt-widget-wrapper .mmt-widget-close {
    position: absolute;
    top: 8px;
    right: 0px;
    display: none;
    width: 20px;
    height: 20px;
    stroke-width: 2px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.35s;
    z-index: 1; }
    .mmt-widget-wrapper .mmt-widget-close:hover {
      opacity: 1; }

/* _keyframes.sass
 * Created by Hyejin (HJ) on 2017/07/26
 */
@keyframes list-hover {
  50% {
    opacity: 0.5; } }
@-webkit-keyframes overflow {
  100% {
    overflow: visible; } }
@keyframes overflow {
  100% {
    overflow: visible; } }
@-webkit-keyframes top-border-effect {
  0% {
    background-position: -300px 0; }
  100% {
    background-position: 300px 0; } }
@keyframes top-border-effect {
  0% {
    background-position: -300px 0; }
  100% {
    background-position: 300px 0; } }
@-webkit-keyframes shrink-border-effect {
  100% {
    transform: rotate(360deg); } }
@keyframes shrink-border-effect {
  100% {
    transform: rotate(360deg); } }
@keyframes fade-in {
  95% {
    opacity: 0; }
  100% {
    opacity: 1; } }
@-webkit-keyframes fade-in {
  95% {
    opacity: 0; }
  100% {
    opacity: 1; } }
/* _spinner.sass
 * Created by Hyejin (HJ) on 2017/07/26
 */
/* _mmt-widget-top-border.sass
 * Created by Hyejin (HJ) on 2017/07/26
 */
.mmt-widget-top-border {
  width: 100%;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(to right, #01c9ca 0%, #3886ff 80%, #01c9ca 100%);
  -webkit-animation: top-border-effect 1.5s infinite forwards;
  animation: top-border-effect 1.5s infinite forwards; }

/* _mmt-widget-content.sass
 * Created by Hyejin (HJ) on 2017/07/26
 */
.mmt-widget-content {
  box-sizing: border-box;
  position: relative;
  padding: 0 16px;
  max-height: 0;
  height: auto;
  overflow: hidden;
  transition: max-height 0.35s; }
  .mmt-widget-content[data-style="city-listed"] .city-listed-style {
    display: block; }
  .mmt-widget-content[data-style="image"] .image-style {
    display: block; }
  .mmt-widget-content[data-style="youtube"] .youtube-style {
    display: block; }
  .mmt-widget-content .city-listed-style {
    display: none; }
    .mmt-widget-content .city-listed-style .title {
      margin-bottom: 16px;
      padding-top: 20px;
      font-size: 20px;
      font-weight: 700;
      text-transform: uppercase; }
    .mmt-widget-content .city-listed-style .city-item {
      position: relative;
      padding: 4px 32px 0 0;
      font-size: 0;
      cursor: pointer; }
      .mmt-widget-content .city-listed-style .city-item:hover .num,
      .mmt-widget-content .city-listed-style .city-item:hover .city-name,
      .mmt-widget-content .city-listed-style .city-item:hover .ico-go {
        animation: list-hover 0.8s infinite; }
    .mmt-widget-content .city-listed-style .num {
      display: inline-block;
      width: 20px;
      line-height: 32px;
      font-size: 16px;
      vertical-align: middle; }
    .mmt-widget-content .city-listed-style .city-name {
      display: inline-block;
      width: calc(100% - 20px);
      line-height: 32px;
      font-size: 16px;
      font-weight: 300;
      font-style: italic;
      vertical-align: middle;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden; }
    .mmt-widget-content .city-listed-style .ico-go {
      position: absolute;
      top: 2px;
      right: 0;
      width: 32px;
      height: 32px; }
  .mmt-widget-content .image-style {
    display: none;
    margin: 0 -16px;
    height: 171px;
    background-image: url("https://productionmedia.mymusictaste.com/static/img/widget/bg_widget_170726.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    overflow: hidden; }
  .mmt-widget-content .youtube-style {
    display: none;
    margin: 0 -16px;
    width: 300px;
    height: 171px;
    background-color: #fff; }
  .mmt-widget-content .search-box {
    position: relative; }
  .mmt-widget-content .search-field {
    position: relative;
    margin-top: 16px; }
    .mmt-widget-content .search-field .ico-search {
      position: absolute;
      top: 50%;
      left: 0;
      display: block;
      width: 12px;
      height: 12px;
      transform: translateY(-50%); }
    .mmt-widget-content .search-field .search-input {
      box-sizing: border-box;
      display: block;
      padding: 0 0 0 20px;
      width: 100%;
      height: 40px;
      background-color: transparent;
      font-family: "Roboto", "Noto Sans KR", sans-serif;
      font-size: 18px;
      box-shadow: none;
      -webkit-border-radius: 0;
      -webkit-appearance: none; }
      .mmt-widget-content .search-field .search-input:focus {
        outline: none; }
      .mmt-widget-content .search-field .search-input:-webkit-autofill {
        -webkit-box-shadow: 0 0 0px 1000px white inset; }
      .mmt-widget-content .search-field .search-input::-webkit-input-placeholder {
        font-weight: 300;
        font-style: italic; }
      .mmt-widget-content .search-field .search-input::-moz-placeholder {
        font-weight: 300;
        font-style: italic; }
      .mmt-widget-content .search-field .search-input:-ms-input-placeholder {
        font-weight: 300;
        font-style: italic; }
      .mmt-widget-content .search-field .search-input::-ms-input-placeholder {
        font-weight: 300;
        font-style: italic; }
      .mmt-widget-content .search-field .search-input::-ms-clear {
        display: none; }
  .mmt-widget-content .search-drop {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 1; }
    .mmt-widget-content .search-drop .result-item {
      padding: 0px 20px;
      line-height: 32px;
      background-color: #f5f5f5;
      font-size: 16px;
      color: #454545;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
      cursor: pointer; }
      .mmt-widget-content .search-drop .result-item:hover {
        background-color: #dedede; }
      .mmt-widget-content .search-drop .result-item:not(:first-child) {
        border-top: 1px solid #dedede; }
    .mmt-widget-content .search-drop .no-results {
      line-height: 32px;
      background-color: #f5f5f5;
      font-size: 16px;
      color: #828282;
      text-align: center; }
      .mmt-widget-content .search-drop .no-results[data-spinner="true"] {
        position: relative;
        font-size: 0 !important; }
        .mmt-widget-content .search-drop .no-results[data-spinner="true"]:before {
          content: "";
          box-sizing: border-box;
          position: absolute;
          top: 50%;
          left: 0;
          right: 0;
          display: block;
          margin: -8px auto;
          width: 16px;
          height: 16px;
          border: 1px solid rgba(33, 33, 33, 0.25);
          border-top: 1px solid rgba(33, 33, 33, 0.5);
          border-width: 1.5px;
          border-radius: 50%;
          font-size: 0;
          -webkit-animation: spinner 0.9s infinite linear;
          animation: spinner 0.9s infinite linear; }
@-webkit-keyframes spinner {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg); }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg); } }
@keyframes spinner {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg); }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg); } }
  .mmt-widget-content .btn {
    box-sizing: border-box;
    display: block;
    margin: 12px 0 28px;
    padding: 0 16px;
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 0;
    background-color: #01c9ca;
    font-family: "Roboto", "Noto Sans KR", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    user-select: none;
    outline: none;
    cursor: pointer;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.35s; }
    .mmt-widget-content .btn:disabled {
      background-color: #dedede;
      cursor: default; }
    .mmt-widget-content .btn:not(:disabled):hover {
      background-color: #01e2e3; }

/* _mmt-widget-bar.sass
 * Created by Hyejin (HJ) on 2017/07/26
 */
.mmt-widget-bar {
  position: relative;
  height: 62px;
  cursor: pointer; }
  .mmt-widget-bar .artist-name {
    margin-bottom: 4px;
    line-height: 18px;
    font-size: 16px;
    font-weight: 700;
    color: #01c9ca;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden; }
  .mmt-widget-bar .description {
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden; }
  .mmt-widget-bar .artist-img {
    position: absolute;
    top: 50%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-image: url("https://productionmedia.mymusictaste.com/static/img/widget/bg_artist_default.300x300.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    transform: translateY(-50%);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }

.fade-in-ready {
  opacity: 0; }

.fade-in-play {
  animation-name: fade-in;
  animation-duration: 2s;
  animation-fill-mode: forwards; }

/*# sourceMappingURL=style.css.map */
            
          
!
            
              $(function(){
		var mmtWidget = $('#mmt-widget');
		var mmtWidgetBarContent = $('#mmt-widget-bar-content');
		var mmtWidgetArtistImg = $('#mmt-widget-artist-img');
		var mmtWidgetClose = $('#mmt-widget-close');

		mmtWidgetBarContent.click(function(){
			mmtWidget.toggleClass('expand');
		});

		mmtWidgetClose.click(function(){
			mmtWidget.removeClass('expand').addClass('shrink');
		});

		mmtWidgetArtistImg.click(function(){
			if(mmtWidget.hasClass('shrink')){
				mmtWidget.removeClass('shrink').addClass('expand');
			}
			else{
				mmtWidget.toggleClass('expand');
			}
		});
	});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console