Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

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

              
                	<script  src="https://code.jquery.com/jquery-3.1.1.min.js"  integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="  crossorigin="anonymous"></script>
	<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" ></script>
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
	<script src="https://use.fontawesome.com/aa95071b26.js"></script>
	<link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet">

	<div class="body">
    <p class="intro">Type and press enter and try emoji keyboard</p>
		<div class="chat-cont">
			<div class="chat-header">
				<div class="name">
					<span>Mr. Perfect</span>
				</div>
				<div class="menu">
					<span class="attach">
						<input type="file" name="">
					</span>
					<div class="burg-menu">
						<span class="menu-ico"></span>
						<ul class="list">
							<li>View contact</li>
							<li>Search</li>
							<li>Mute Chat</li>
							<li>Block</li>
							<li>More <span class="cart"></span></li>
						</ul>
					</div>
				</div>
			</div>
			<div class="chat-body">
				<div class="chats-text-cont">
					
				</div>
			</div>
			<div class="chat-inp">
				<div class="emoji"></div>
				<div class="chat-input">
					<div class="input" contenteditable="true"></div>
				</div>
				<div class="opts">
					<a class="mic"></a>
					<a class="send"></a>
				</div>
			</div>
			<div class="emoji-dashboard">
				<ul class="emojis">
					<li class="emoji" data-clipboard-text="--1"><i class="em em---1"></i></li>
					<li class="emoji" data-clipboard-text="-1"><i class="em em--1"></i></li>
					<li class="emoji" data-clipboard-text="100"><i class="em em-100"></i></li>
					<li class="emoji" data-clipboard-text="1234"><i class="em em-1234"></i></li>
					<li class="emoji" data-clipboard-text="8ball"><i class="em em-8ball"></i></li>
					<li class="emoji" data-clipboard-text="a"><i class="em em-a"></i></li>
					<li class="emoji" data-clipboard-text="ab"><i class="em em-ab"></i></li>
					<li class="emoji" data-clipboard-text="abc"><i class="em em-abc"></i></li>
					<li class="emoji" data-clipboard-text="abcd"><i class="em em-abcd"></i></li>
					<li class="emoji" data-clipboard-text="accept"><i class="em em-accept"></i></li>
					<li class="emoji" data-clipboard-text="aerial_tramway"><i class="em em-aerial_tramway"></i></li>
					<li class="emoji" data-clipboard-text="airplane"><i class="em em-airplane"></i></li>
					<li class="emoji" data-clipboard-text="alarm_clock"><i class="em em-alarm_clock"></i></li>
					<li class="emoji" data-clipboard-text="alien"><i class="em em-alien"></i></li>
					<li class="emoji" data-clipboard-text="ambulance"><i class="em em-ambulance"></i></li>
					<li class="emoji" data-clipboard-text="anchor"><i class="em em-anchor"></i></li>
					<li class="emoji" data-clipboard-text="angel"><i class="em em-angel"></i></li>
					<li class="emoji" data-clipboard-text="anger"><i class="em em-anger"></i></li>
					<li class="emoji" data-clipboard-text="angry"><i class="em em-angry"></i></li>
					<li class="emoji" data-clipboard-text="anguished"><i class="em em-anguished"></i></li>
					<li class="emoji" data-clipboard-text="ant"><i class="em em-ant"></i></li>
					<li class="emoji" data-clipboard-text="apple"><i class="em em-apple"></i></li>
					<li class="emoji" data-clipboard-text="aquarius"><i class="em em-aquarius"></i></li>
					<li class="emoji" data-clipboard-text="aries"><i class="em em-aries"></i></li>
					<li class="emoji" data-clipboard-text="arrow_backward"><i class="em em-arrow_backward"></i></li>
					<li class="emoji" data-clipboard-text="arrow_double_down"><i class="em em-arrow_double_down"></i></li>
					<li class="emoji" data-clipboard-text="arrow_double_up"><i class="em em-arrow_double_up"></i></li>
					<li class="emoji" data-clipboard-text="arrow_down"><i class="em em-arrow_down"></i></li>
					<li class="emoji" data-clipboard-text="arrow_down_small"><i class="em em-arrow_down_small"></i></li>
					<li class="emoji" data-clipboard-text="arrow_forward"><i class="em em-arrow_forward"></i></li>
					<li class="emoji" data-clipboard-text="arrow_heading_down"><i class="em em-arrow_heading_down"></i></li>
					<li class="emoji" data-clipboard-text="arrow_heading_up"><i class="em em-arrow_heading_up"></i></li>
					<li class="emoji" data-clipboard-text="arrow_left"><i class="em em-arrow_left"></i></li>
					<li class="emoji" data-clipboard-text="arrow_lower_left"><i class="em em-arrow_lower_left"></i></li>
					<li class="emoji" data-clipboard-text="arrow_lower_right"><i class="em em-arrow_lower_right"></i></li>
					<li class="emoji" data-clipboard-text="arrow_right"><i class="em em-arrow_right"></i></li>
					<li class="emoji" data-clipboard-text="arrow_right_hook"><i class="em em-arrow_right_hook"></i></li>
					<li class="emoji" data-clipboard-text="arrow_up"><i class="em em-arrow_up"></i></li>
					<li class="emoji" data-clipboard-text="arrow_up_down"><i class="em em-arrow_up_down"></i></li>
					<li class="emoji" data-clipboard-text="arrow_up_small"><i class="em em-arrow_up_small"></i></li>
					<li class="emoji" data-clipboard-text="arrow_upper_left"><i class="em em-arrow_upper_left"></i></li>
					<li class="emoji" data-clipboard-text="arrow_upper_right"><i class="em em-arrow_upper_right"></i></li>
					<li class="emoji" data-clipboard-text="arrows_clockwise"><i class="em em-arrows_clockwise"></i></li>
					<li class="emoji" data-clipboard-text="arrows_counterclockwise"><i class="em em-arrows_counterclockwise"></i></li>
					<li class="emoji" data-clipboard-text="art"><i class="em em-art"></i></li>
					<li class="emoji" data-clipboard-text="articulated_lorry"><i class="em em-articulated_lorry"></i></li>
					<li class="emoji" data-clipboard-text="astonished"><i class="em em-astonished"></i></li>
					<li class="emoji" data-clipboard-text="atm"><i class="em em-atm"></i></li>
					<li class="emoji" data-clipboard-text="b"><i class="em em-b"></i></li>
				</ul>
			</div>
		</div>
	</div>

<div class="site-link">
		<a href="http://creatorvisions.com" target="_blank">
			Creator <img src="http://creatorvisions.com/img/new-logo-2.png"> 
		Visions</a>
	</div>
	<style type="text/css">
		.site-link{
      padding: 5px 15px;
			position: fixed;
			z-index: 99999;
			background: #fff;
			box-shadow: 0 0 4px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.28);
			right: 30px;
			bottom: 30px;
			border-radius: 10px;
		}
		.site-link img{
			width: 30px;
			height: 30px;
		}
	</style>
    
              
            
!

CSS

              
                p.intro {
    font-size: 20px;
    color: #fff;
    text-align: center;
    padding: 15px;
    margin: 0 0 -50px;
}
.body{
			background: #303030;
			padding: 1px;
			min-height: 100vh;
		}
		.chat-cont{
			position: relative;
			z-index: 1;
			width: 350px;
			box-shadow: 0 5px 10px -4px rgba(0,0,0,0.5);
			background: #fff;
			margin: 50px auto;
			color: #999;
		}
		@media (max-width: 767px){
			.body .chat-cont{
				width: 90%;
			}
      .body{
        padding-bottom: 100px;
      }
		}
		.chat-cont > div{
			padding: 15px;
			background: #0af;
			color: #fff;
		}
		.chat-cont .chat-body{
			background: #eee;
			display: flex;
			align-items: flex-end;
			min-height: 350px;
		}
		.chat-cont .chat-body .chats-text-cont{
			width: 100%;
			padding: 5px;
			padding-right: 15px;
			max-height: 350px;
			overflow-y: overlay;
			overflow-x: hidden;
		}
		.body *::-webkit-scrollbar {
			width: 5px;
			background: transparent;
			position: absolute;
			left: 0;
		}
		.body *::-webkit-scrollbar-thumb {
			background-color: rgba(0,0,0,0);
			border-radius: 5px;
		}
		.body *:hover::-webkit-scrollbar-thumb {
			background-color: rgba(0,0,0,.3);
			border-radius: 5px;
		}
		.chat-cont .chat-body .chat-text{
			margin-bottom: 15px;
			text-align: right;
		}
		.chat-cont .chat-body .chat-text img{
			height: 26px;
			padding: 5px;
		}
		.chat-cont .chat-body .chat-text > span{
			padding: 5px 15px;
			border-radius: 10px;
			background: #0af;
			display: inline-block;
			max-width: 100%;
			word-wrap: break-word;
		}
		.chat-cont .chat-header{
			display: flex;
		}
		.chat-header .name{
			position: relative;
			line-height: 40px;
			display: inline-block;
			flex: 2;
			position: relative;
			padding-left: 50px;
		}
		.chat-header .name:before{
			content: '';
			height: 40px;
			width: 40px;
			display: inline-block;
			background: #fff url(http://main.buildabazaar.com/img/shrd/html_widget_images/38/14/604/12a5a8d897be2_nobodym.original.jpg.999xx.jpg) center no-repeat / 100%;
			border-radius: 50%;
			position: absolute;
			left: 0;	
			top: 0;
		}
		.chat-header .menu{
			display: flex;
			position: relative;
		}
		.chat-header .menu .burg-menu ul.list, .emoji-dashboard{
			display: none;
			padding: 0;
			position: absolute;
			top: 110%;
			margin: 0;
			box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2);
			background: #fff;
			list-style-type: none;
			color: #a0a0a0;
			right: 0;
			z-index: 9999;
		}
		.emoji-dashboard{
			bottom: 0;
			top: auto;
		}
		.chat-header .menu .burg-menu ul.list li{
			padding: 10px 25px;
			white-space: nowrap;
			border-bottom: solid 1px #eee; 
			cursor: pointer;
		}

		.chat-header .menu .burg-menu ul.list li:last-child{
			border: none;
		}
		.chat-header .menu .burg-menu ul.list li:hover{
			background: #eee;
		}
		.chat-header .menu .attach, .chat-header .menu .menu-ico{
			display: inline-block;
			height: 40px;
			width: 40px;
			position: relative;
			text-align: center;
			cursor: pointer;
			margin-left: 10px;
			overflow: hidden;
		}
		.chat-header .menu .attach input{
			opacity: 0;
			position: absolute;
			left: 0;
			width: 100%;
			top: 0;
			height: 100%;
			z-index: 1;
		}
		.chat-header .menu .attach:focus, .chat-header .menu .menu-ico:focus,.chat-header .menu .attach:active, .chat-header .menu .menu-ico:active{
			background: rgba(255,255,255,.2);
		}
		.chat-header .menu .attach:before, .chat-header .menu .menu-ico:before{
			content: '';
			font-family: fontAwesome;
			line-height: 40px;
			font-size: 30px;
			font-weight: normal;
			-webkit-text-stroke: .5px #0af;
		}
		.chat-header .menu .attach:before{
			content: '\f0c6';
		}
		.chat-header .menu .menu-ico:before{
			content: '\f142';
			-webkit-text-stroke: 2px #0af;
		}
		.chat-cont > div.chat-inp{
			background: #ddd;
			display: flex;
			padding: 10px;
			position: relative;
		}
		.chat-inp .chat-input{
			flex: 2;
			max-width: calc(100% - 70px);
			position: relative;
			z-index: 999;
		}
		.input img{
			height: 25px;
		}
		.input br{
			display: none;
		}
		.chat-inp .chat-input input,.input{
			height: 100%;
			width: 100%;
			border: solid 1px transparent;
			padding: 5px;
			height: 35px;
			color: #a0a0a0;
			box-shadow:0 2px 5px 0 rgba(0,0,0,.06), 0 2px 10px 0 rgba(0,0,0,.02);
			transition: all .25s;
			background: #fff;
			overflow-y: overlay; 
		}
		.chat-input.lined .input{			
			height: 80px;
			margin-top: -35px;
			margin-bottom: -5px;
		}
		.chat-inp .chat-input input:focus,.input:focus{
			outline: none;
			//box-shadow:0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15);
		}
		.chat-inp .emoji{			
			display: inline-block;
			height: 35px;
			width: 35px;
			background: #fff;
			text-align: center;
			cursor: pointer;
			top: 0;
			left: 10px;
			bottom: 0;
			margin: auto;
		}
		.chat-inp .emoji:before {
			content: '\f118';
			font-family: fontAwesome;
			line-height: 35px;
			font-size: 20px;
			font-weight: normal;
			color: #a0a0a0;
		}
		.chat-inp .opts{
			background: #fff;
			top: 0;
			right: 10px;
			height: 35px;
			bottom: 0;
			margin: auto;
			width: 35px;
			overflow: hidden;
		}
		.chat-inp .opts a{
			display: inline-block;
			height: 35px;
			width: 35px;
			position: relative;
			text-align: center;
			cursor: pointer;
			transition: all .25s;
		}
		.chat-inp .opts a:before{			
			content: '\f118';
			font-family: fontAwesome;
			line-height: 35px;
			font-size: 20px;
			font-weight: normal;
			color: #a0a0a0;
		}
		.chat-inp .opts a.send:before{
			content: '\f1d9';
		}
		.chat-inp .opts a.mic:before{
			content: '\f130';
		}
		.chat-inp .lined + .opts a{
			transform: translateY(-35px);
		}
		a:hover{
			outline: none;
			text-decoration: none;
		}
		.emoji-dashboard .emojis {
			list-style-type: none;
			display: flex;
			flex-wrap: wrap;
			padding: 0;
			height: 200px;
			overflow-y: overlay;
			overflow-x: hidden;
		}
		.emoji-dashboard .emojis li {
			margin: 5px 15px;
			cursor: pointer;
		}
              
            
!

JS

              
                $('.chat-header .menu .menu-ico').click(function(){
			$('.chat-header .menu ul.list').slideToggle('fast');
		});
		$(document).click(function(){
			$(".chat-header .menu ul.list").slideUp('fast');
		});
		$(".chat-header .menu ul.list,.chat-header .menu .menu-ico").click(function(e){
			e.stopPropagation();
		});
		$('.chat-inp .emoji').click(function(){
			$('.emoji-dashboard').slideToggle('fast');
		});
		$(document).click(function(){
			$(".emoji-dashboard").slideUp('fast');
		});
		$(".chat-header .menu ul.list,.chat-inp .emoji").click(function(e){
			e.stopPropagation();
		});
		$('.emoji-dashboard li .em').click(function(){
			var emo = $(this).css('background-image').split('"')[1];
			$('.chat-inp .input').find('div').remove();
			$('.chat-inp .input').append('<img src="'+emo+'">');
			$(".emoji-dashboard").slideUp('fast');

		});
		$('.chat-inp .opts .send').click(function(){
			var val = $('.chat-inp .input').html();
			if (val.length > 0){
				$('.chat-body .chats-text-cont').append('<p class="chat-text"><span>'+val+'</span></p>')
			}
			$('.chat-inp .input').html('');
			$('.chats-text-cont div').remove();
		});
		$('input,.input').each(function(){
			tmpval = $(this).text().length;
			if(tmpval != '') {
				$(this).prev().addClass('trans');
				$(this).parent().addClass('lined');
			}
		});
		$('input,.input').focus(function() {
			$(this).prev().addClass('trans');
			$(this).parent().addClass('lined');
			$(document).keypress(function(e) {
				if(e.which == 13) {
					$('.chat-inp .opts .send').click();
				}
			});
		}).blur(function() {
			if ($(this).text().length == ''){
				$(this).prev().removeClass('trans');
				$(this).parent().removeClass('lined');
			}
		});
              
            
!
999px

Console