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

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

              
                <!-- HERE the original HTML code of the BASEBALL Scoreboard.
This is the most complex schema!


!!!!------ REMEMBER --------!!!!
on Flexyscore 
YOU WILL NOT BE ABLE TO MODIFY HTML PART! -->
<section id="boxes">
<div class="container containerbaseball">
    <div class="box boxhometeam" id="team_1">Royals</div>
    <div class="box boxhomepoints" id="points_1">20</div>
    <div class="box boxawaypoints" id="points_2">21</div>
    <div class="box boxawayteam" id="team_2">Astros</div>

<div class="containergamedata">
    <div class="box boxservice boxhomeservice">
      <span id="homeservice" class="okservice">
      <svg class="triangleup" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 7">
      <polygon points="5,0 0,7 10,7"/>
      </svg>
      </span>
    </div>
    <div class="box containerinnings">
    <div class="box boxinnings" id="innings">4</div>
    <div class="box boxinningslabel">Inn</div>
</div>
<div class="box boxservice boxawayservice">
      <span id="awayservice" class="noservice">
      <svg class="triangledown" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 7">
      <polygon points="5,7 10,0 0,0 "/>
      </svg>
      </span>
    </div>
</div>
			
    <div class="containerlastrow">
      <div class="sgrlogo" style="background: url(https://www.live.flexyscore.net/logofs.svg) no-repeat center;"></div>
      <div class="box containerboxstrikes">
      <span class="box boxballs" id="balls">3</span>
      <span class="box boxballsstrikesseparator">-</span>
      <span class="box boxstrikes" id="strikes">1</span>
    </div>
				
    <div class="box containerouts">
      <div class="box boxouts" id="outs">2</div>
      <div class="box boxouts boxoutslabel">Out</div>
    </div>
				
    <div class="box containerbases">
      <div class="box boxbases boxon" id="b1"></div>
      <div class="box boxbases boxon" id="b2"></div>
      <div class="box boxbases boxbasesoff" id="b3"></div>
    </div> 
  </div>                
</div>
</section>
              
            
!

CSS

              
                /* INSTRUCTION and example for customize BASEBALL scoreboard:
Each element has one or more classes, so you can control one or more elements at the same time.
On the left you can read every single element with his class 

This template is pretty complex, we have a grid with 11 elements pay attention when making variations */

.box {
  background: #333;
  color: #ccc;
}

.boxhomepoints, .boxawaypoints {background:#666;}

.okservice svg {
  fill:#ffd300;
}
.containerbaseball .boxon {
  background:#ffd300;
}
.boxinnings, .boxinningslabel {
  color: red;
}

.boxhometeam, .boxawayteam {
  position:relative;
  padding-left: 12vw;
}
.boxhometeam:before, .boxawayteam:before {
  content:""; 
  display:block;
  position: absolute;
  width: 10vw;
  height:100%;
  top:0;
  left:0;
}

.boxhometeam:before {
  background: url(https://www.mlbshopeurope.com/content/ws/33167/kansascity_royals_primary.svg) no-repeat center;
}
.boxawayteam:before {
  background: url(https://www.mlbshopeurope.com/content/ws/33167/houston_astros_primary.svg) no-repeat center;
}

/*-------------------------------------------------------------------
---- UNDER: background color and little adjustments. PLEASE DO NOT CONSIDER THIS-*/
.boxservice svg {height: 6vw;}
body {background:#ccc;}
#boxes {margin-top:20px;}
              
            
!

JS

              
                
              
            
!
999px

Console