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 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.

HTML

              
                <html lang="he">

<head>
  <title>Mastering HTML 5.1!</title>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body>
  <section class="context-example">
    <button class="trigger" contextmenu="right-click-menu">
      לחץ עלי (עם הלחצן הימני!)
    </button>
  </section>

  <menu type="context" id="right-click-menu">
    <menu label="שיתוף ברשתות חברתיות">
      <menuitem type="action" label="צייץ בטוויטר" icon="ico_twitter.png" onclick="share('טוויטר')"></menuitem>
      <menuitem type="action" label="שתף בפייסבוק" icon="ico_facebook.png" onclick="share('פייסבוק')"></menuitem>
      <menuitem type="action" label="שתף בגוגל +" icon="ico_google.png" onclick="share('גוגל +')"></menuitem>
    </menu>
    <menuitem type="action" label="שליחת תוכן הבלוק באימייל" icon="ico_email.png" onclick="email()"></menuitem>
    <menuitem type="action" label="הדפסת תוכן הבלוק" icon="ico_print.png" onclick="print()"></menuitem>
    <menuitem type="checkbox" label="סמן אותי!"></menuitem>
    <menu label="יישור טקסט">
      <menuitem type="radio" radiogroup="alignment" label="ישר טקסט לימין" checked></menuitem>
      <menuitem type="radio" radiogroup="alignment" label="ישר טקסט לשמאל"></menuitem>
    </menu>
</body>

</html>
              
            
!

CSS

              
                body, section, details, summary {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  height: 100vh;
  padding: 30px;
  font-family: arial;
  direction: rtl;
  text-align: right;
   display: flex;
  justify-content: center;
  align-items: center;
}

.context-example .trigger {
  background: rgba(0, 173, 167, 0.4);
  width: auto;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  color: #303030;
  font-weight: bold;
  cursor: pointer;
  border: 0;
  border-bottom: 3px solid rgba(0, 173, 167, 0.4);
}

.context-example .trigger:hover {
  border-bottom: 3px solid rgba(48, 48, 48, 0.5);
}

.context-example .trigger:focus {
  outline: none;
  border-bottom: 3px solid rgb(48, 48, 48);
}
              
            
!

JS

              
                function share(platform) {
  if(platfrom == "טוויטר")
    alert('תוכן הבלוק צוייץ בטוויטר! (לא באמת)');
  else
    alert('תוכן הבלוק שותף ב' + platform + '!(לא באמת)');
}

function email() {
  var address = prompt("הכנס כתובת אימייל");
  
  if(address != null)
    alert('תוכן הבלוק נשלח למייל');
}

function print() {
  alert('מדפיס את תוכן העמוד.. (עדיין לא באמת)');
}
              
            
!
999px

Console