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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


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


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.


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.


                <div class = "container-fluid">
<div class = "mask">
<div class="location">
  <span id="city">City </span>
  <span id="country">Country </span>
<center><div class="temperature">
  <span id="temp">Temperature</span>
  <span id="unit">°C</span>
<div class="details">
  <span id="descr">Description</span>
  <span id="humid">Humidity</span>


                html {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  margin-top: 100px;
  background: url( center no-repeat fixed;
  background-size: cover;

div {
  text-align: center;
  margin: 0px 0px 20px 0px;
  font-size: 40px;
  color: white;
  font-family: Sorts Mill Goudy;

.mask {
  background: rgba(0, 0, 0, 0.25);
  height: auto;

.temperature {
  cursor: pointer;
  width: 100px;



  var location;
  var forecast;
  var background;
  var currentWeather;
  //Shake Temperature
  function shake(){
    $( ".temperature" ).effect( "shake", {times: 3, distance: 2}, 500 );
  var shakey = setInterval(shake, 1500);
  //Get Location And Weather
  $.getJSON('', function(data){
    var coordinates = data.loc.split(",");
    location = {
      "lat": coordinates[0],
      "long": coordinates[1]
      $.getJSON("" + + "&lon=" + location.long + "&units=metric&APPID=433e5ac19c344d585ded5fba77c92ded", function(data){
    forecast = {
      "temperature": data.main.temp,
      "humidity": data.main.humidity
    currentWeather = forecast.main;
        //Background Change
  background = {
    "Thunderstorm": "",
    "Drizzle": "",
    "Rain": "",
    "Snow": "",
    "Atmosphere": "",
    "Clear": "",
    "Clouds": "",
    "Extreme": ""  
  $('html').css("background", "url(" + background[currentWeather] + ") center no-repeat fixed");
        $('html').css("background-size", "cover");
     $("#humid").html("humidity: " + forecast.humidity + "%");
  //Change Units
    var unit = document.getElementById("unit").innerHTML;
    var temp = parseInt(document.getElementById("temp").innerHTML);
    if(unit === "°C"){
    } else{