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


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


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.


<h2>Skraćenje sa CSS-om (za sve browsere zajedno)</h2>
<div class="fixed-text-container">
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>



                // Definiše se samo fixsirani kontejner
.fixed-text-container {
  width: 20rem;
  height: 4.5rem;    // Proračunata visina 3 reda = 3 x 1.5rem (line-height) 
  overflow: hidden;
  position: relative;
  // Za line-clamp
   display: -webkit-box;
   -webkit-line-clamp: 3; // Broj redova
   -webkit-box-orient: vertical;
  // Za Operu
  text-overflow: -o-ellipsis-lastline;
  // Za fade 
  &:after {
    content: "";
    text-align: right;
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30%;
    height: 1.5rem;     // Visina jednog reda = line-height
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 50%);
p {
  line-height: 1.5rem;

@import url(;
body {
  padding: 20px;
  font: 1.2em/1.2em 'Open Sans', sans-serif;
h2 {
  font-size: 20px;
  border-bottom: solid 1px black;
  margin: 0 0 1em 0;
p {
    margin: 0;