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

              
                <div class="container">
<h1>Mengganti Background Blog Secara Random</h1>
<span>
  <h3>Gambar background akan berubah apabila halaman di refresh</h3>
  <input type="button" value="Refresh Page" onclick="refreshPage()"></input>
  <p>How to use: <a href="https://www.caramanual.com/2018/11/memasang-gambar-background-random-di-blogger.html" title="Cara Memasang Gambar Background Random di Blogger">Cara Memasang Gambar Background Random di Blogger</a></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed pretium elit, id varius eros. Phasellus rutrum ligula risus, eget ornare quam faucibus ut. Pellentesque cursus porta ligula, eget pellentesque erat feugiat vestibulum. In odio ante, gravida nec arcu a, luctus euismod erat. Nam eu mattis nisl. Duis porta sapien at dapibus porttitor. Duis ullamcorper lectus a vehicula auctor. Vestibulum in pretium nibh. Maecenas mi dui, sollicitudin ut sem eu, congue mollis lacus.
</br> </br>
Praesent fermentum eros quam, sit amet facilisis neque auctor sagittis. Etiam lacinia purus quis ex commodo, nec faucibus enim lobortis. Fusce libero lacus, porta id urna vel, viverra placerat eros. In commodo sed libero ut interdum. In iaculis augue eu diam varius, quis venenatis ipsum placerat. Duis ac dignissim lectus. Donec porttitor at sem non condimentum. Suspendisse potenti. Etiam semper ex eu risus dictum vulputate. Aenean mollis dolor tellus, rutrum egestas nisi congue ac.
</br> </br>
Fusce et sem vel nulla viverra suscipit. Praesent suscipit sem luctus, fringilla turpis non, scelerisque risus. Nulla sed venenatis purus. Ut suscipit luctus enim, a iaculis ipsum congue a. Etiam sed quam purus. Phasellus vel massa maximus, mollis neque sit amet, fermentum urna. Donec tincidunt augue ut posuere blandit. Aliquam massa nibh, tristique at ex sed, sagittis tincidunt nisi. Maecenas sollicitudin dapibus imperdiet. Quisque odio felis, ullamcorper consequat sapien nec, gravida dapibus sem.</p>
</span>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);
body {
  background: #f1f1f1 none repeat scroll top left;
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  padding: 0;
  position: relative;
  line-height: normal;
}

a,
a:visited {
  color: #555;
  outline: none;
  text-decoration: none;
}

a:hover,
a:focus,
a:visited:hover {
  color: #22a1c4;
  text-decoration: none;
}

.container {
  max-width: 768px;
  margin: 1% auto;
  padding: 30px;
  background: #fff;
  color: #95a5a6;
  font-family: 'Open Sans', sans-serif;
  font-size: 1em;
  line-height: normal;
}

.container h1,
.container h2 {
  display: block;
  text-align: center;
  margin-bottom: 30px;
  font-size: 2em;
  font-weight: 700;
  color: #336699;
}

.container h2 {
  margin-top: 30px;
}
.container h3 {
  text-align:center;
}
.container input {
  margin: 30px auto;
  text-align:center;
  display:table;
  padding:10px 15px;
  font-size:16px;
  background:#8092e9;
  color:#fff;
  border:0;
  border-radius:1px;
  cursor:pointer;
  transition:all .3s
}
.container input:hover,.container input:active {
  background:#3c5aeb;
  color:#fff;
  outline:none
}
              
            
!

JS

              
                //<![CDATA[
var Background=new Array;Background[0]="#f5f5f5 url('https://1.bp.blogspot.com/-Vb2jzLkkeB0/W-uPL05UN2I/AAAAAAAAHLY/Wg2PFESPjOkjEIr0BGjT5N51kWg3SHO-QCLcBGAs/s320/background%2B1.jpg') no-repeat top center fixed",Background[1]="#f5f5f5 url('https://1.bp.blogspot.com/-biufA2HFHVo/W-uPLiIpZWI/AAAAAAAAHLU/nuhIkdEHXvchsvdyp_4uacDBaNIkH2VCgCLcBGAs/s320/background%2B2.jpg') no-repeat top center fixed",Background[2]="#f5f5f5 url('https://1.bp.blogspot.com/-Af-oe9q1kQo/W-uPLx2qlFI/AAAAAAAAHLc/DkZPwegM51wP1lRhE3nX3JWUnmZbuGp0wCLcBGAs/s320/background%2B3.jpg') no-repeat top center fixed",Background[3]="#f5f5f5 url('https://1.bp.blogspot.com/-Xg-yRiuI7ns/W-uPNRZwxzI/AAAAAAAAHLg/NZnhxDs2B7kN3Umy5h8OJvMZi0Qu3E-vwCLcBGAs/s320/background%2B4.jpg') no-repeat top center fixed";var random=Math.floor(4*Math.random());document.write("<style>"),document.write("body {"),document.write("background: "+Background[random]+";"),document.write("background-size:100%;"),document.write(" }"),document.write("</style>");
//]]>
function refreshPage() {
  window.location.href = window.location.href;
}
              
            
!
999px

Console