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

              
                <html>
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title></title>
<!--		<link rel="stylesheet" href="style.css" type="text/css">-->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" integrity="sha384-y3tfxAZXuh4HwSYylfB+J125MxIs6mR5FOHamPBG064zB+AFeWH94NdvaCBm8qnd" crossorigin="anonymous">
    <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
    <link href="https://fonts.googleapis.com/css?family=Lobster|Tangerine:700|Dancing+Script|Berkshire+Swash" rel="stylesheet">
    </head>
    <body>
    <div class="container">
        <h1>Quotes to keep you going</h1>
        <div class="row">
        <div class="col-md-6 col-md-offset-3">
					<div id="random-quote">The way to get started is to quit talking and begin doing. 
						<p id="author">- Walt Disney</p>
					</div>
				</div>
			</div>
				<div class="row row-bottom">
					<div class="col-md-3 col-md-offset-3 col-xs-6 ">
							<button type="button" class="btn btn-primary btn-block change-quote" >New Quote</button>
					</div>
					<div class="col-md-4 col-md-offset-2 col-xs-4 col-xs-offset-2" id="twitter"><a href="https://twitter.com/intent/tweet?text=The way to get started is to quit talking and begin doing. - Walt Disney " target='_blank'><i class="fa fa-twitter fa-3x"></i></a>
					</div>					
				</div>
		</div>
      
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="https://npmcdn.com/tether@1.2.4/dist/js/tether.min.js"></script>
		<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/js/bootstrap.min.js" integrity="sha384-vZ2WRJMwsjRMW/8U7i6PWi6AlO1L79snBrmgiDpgIWJ82z8eA5lenwvxbMV1PAh7" crossorigin="anonymous"></script>
		<link rel="stylesheet" href="style.css" type="text/css">
	</body>   
</html>

              
            
!

CSS

              
                body{
	height: 100%;
	width: auto;
	background-image: linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%); !important;
	margin-bottom: 0px;
}
.container{
	margin: 15px auto;
	padding: 15px;
	margin-bottom:250px;
}
#random-quote{
	font-family: 'Berkshire Swash', cursive !important;
	font-size: 24px !important;
	background-image: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
	margin: auto 15px;
	padding: 15px;
	text-align: left;	
	font-size: 25px;
	border-radius: 10%;
	width: auto;
	height: 400px;
	display: table-cell;
  vertical-align: middle;
	overflow:hidden;
}
#author{
	text-align: right;
}
.row-bottom{
	margin-top: 25px;
}
.btn{
	padding: 15px;
}
h1{
	font-family: 'Tangerine', cursive !important;
	text-shadow: 2px 2px 4px #263238;
	font-size: 72px !important;
	text-align: center;
	margin-top: 15px;
	margin: 15px;
	padding: 15px;	
}
@keyframes stretch{
		0%   {transform: scaleX(1.30);
					opacity: 0;
					}
		100% {transform: scaleX(1);
					opacity: 1;
				}
}
#random-quote p{
	animation-name: stretch;
	animation: stretch .6s ease;	
}
              
            
!

JS

              
                
$(document).ready(function(){			
			$(".change-quote").on("click", function(e){
				e.preventDefault();	
				var url = "https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1";
				$.ajax({
					url: url,
					type : 'GET',
					dataType : 'json',
					cache : false,
					success : function(data){						
						var post = data.shift();
							$("#random-quote").html(post.content + "<p id='author'> - '" + post.title + "'</p>"); 
            var tweete = $('#random-quote').text();
            console.log(tweete);
            $("#twitter").html("<a href= https://twitter.com/intent/tweet?text='" + encodeURIComponent(tweete) +"' target = '_blank'><i class= \"fa fa-twitter fa-3x\"></i></a>");
					}
				});
			});
		});

              
            
!
999px

Console