cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <div class="page">
  <div class="page__content">
    <div class="page__demo">
      <div class="demo">
        <span class="demo__label">#1</span>
        <nav class="pagination pagination_type1">
          <ol class="pagination__list">
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_prev">prev</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">1</a></li>
            <li class="pagination__group"><span class="pagination__item pagination__item_active">2</span></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">3</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_next">next</a></li>
          </ol>
        </nav>
      </div>
      <div class="demo">
        <span class="demo__label">#2</span>
        <nav class="pagination pagination_type2 pagination_type3">
          <ol class="pagination__list">
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_prev">prev</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">1</a></li>
            <li class="pagination__group"><span class="pagination__item pagination__item_active">2</span></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">3</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_next">next</a></li>
          </ol>
        </nav>
      </div> 
      <div class="demo">
        <span class="demo__label">#3</span>
        <nav class="pagination pagination_type1 pagination_type3">
          <ol class="pagination__list">
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_prev">prev</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">1</a></li>
            <li class="pagination__group"><span class="pagination__item pagination__item_active">2</span></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">3</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_next">next</a></li>
          </ol>
        </nav>
      </div> 
      <div class="demo">
        <span class="demo__label">#4</span>
        <nav class="pagination pagination_type2 pagination_type3">
          <ol class="pagination__list">
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_prev">prev</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">1</a></li>
            <li class="pagination__group"><span class="pagination__item pagination__item_active">2</span></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">3</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_next">next</a></li>
          </ol>
        </nav>
      </div> 
      <div class="demo">
        <span class="demo__label">#5</span>
        <nav class="pagination pagination_type1 pagination_type3">
          <ol class="pagination__list">
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_prev">prev</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">1</a></li>
            <li class="pagination__group"><span class="pagination__item pagination__item_active">2</span></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">3</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_next">next</a></li>
          </ol>
        </nav>
      </div> 
      <div class="demo">
        <span class="demo__label">#6</span>
        <nav class="pagination pagination_type1">
          <ol class="pagination__list">
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_prev">prev</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">1</a></li>
            <li class="pagination__group"><span class="pagination__item pagination__item_active">2</span></li>
            <li class="pagination__group"><a href="#0" class="pagination__item">3</a></li>
            <li class="pagination__group"><a href="#0" class="pagination__item pagination__control pagination__control_next">next</a></li>
          </ol>
        </nav>
      </div>        
    </div>
  </div>
  <div class="page__footer">
    <p class="page__donation-text">
      If you like this demo in particular and my work in general and you want me to be able to continue putting stuff out, please show your appreciation with a <a href="https://www.paypal.me/melnik909" class="page__donate" rel="noopener noreferrer" target="_blank">donation</a>
    </p>
  </div>
</div>

            
          
!
            
              /*
=====
LEVEL 0. RESET BROWSER'S STYLES
=====
*/

.pagination__list{
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0;
  list-style: none;  
}

/*
=====
LEVEL 1. CORE COMPONENT STYLES
=====
*/

.pagination{
  --uiPaginationAlign: var(--paginationAlign);
  --uiPaginationArrowSize: var(--paginationArrowSize, 22px);
  --uiPaginationFontSize: var(--paginationFontSize);  
  
  font-size: var(--uiPaginationFontSize);
}

.pagination__list{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: var(--uiPaginationAlign);
}

.pagination__item:not(.pagination__control_prev):not(.pagination__item_active){
  padding-left: .5em;
}

.pagination__item:not(.pagination__control_next):not(.pagination__item_active){
  padding-right: .5em;
}

.pagination__item{
  display: inline-block;
  line-height: 1;
}

.pagination__control{
  position: relative;
}

.pagination__control:before, .pagination__control:after{
  font-size: var(--uiPaginationArrowSize);
  line-height: 1;
  
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.pagination__control_prev{
  padding-left: calc(var(--uiPaginationArrowSize) + 5px);
}

.pagination__control_prev:before{
  content: "←";
  left: 0;
}

.pagination__control_next{
  padding-right: calc(var(--uiPaginationArrowSize) + 5px);
}

.pagination__control_next:after{
  content: "→";
  right: 0;
}

.pagination__item_active{
  padding: .5875em .8em;
  margin-right: .5em;
  margin-left: .5em;
}

/*
=====
LEVEL 2. PRESENTATION STYLES
=====
*/

.pagination{
  --uiPaginationItemTextColor: var(--paginationItemTextColor);
  --uiPaginationItemActiveTextColor: var(--paginationItemActiveTextColor);  
}

.pagination__item{
  text-decoration: none;
  color: var(--uiPaginationItemTextColor);
}

.pagination__item_active{
  font-weight: 700;
  color: var(--uiPaginationItemActiveTextColor);
}

.pagination__item:focus{
  outline-color: var(--uiPaginationItemActiveBgColor);
}

/* type 1 */

.pagination_type1{
  --uiPaginationItemActiveBgColor: var(--paginationItemActiveBgColor);
}

.pagination_type1 .pagination__item_active{
  background-color: var(--uiPaginationItemActiveBgColor);
}

/* type 2 */

.pagination_type2{
  --uiPaginationItemActiveBorderWidth: var(--paginationItemActiveBorderWidth);
  --uiPaginationItemActiveBorderColor: var(--paginationItemActiveBorderColor, transparent);
}

.pagination_type2 .pagination__item_active{
  border: var(--uiPaginationItemActiveBorderWidth) solid var(--uiPaginationItemActiveBorderColor);
}

/* type 3 */

.pagination_type3{
  --uiPaginationItemBorderRadius: var(--paginationItemBorderRadius);
}

.pagination_type3 .pagination__item_active{
  border-radius: var(--uiPaginationItemBorderRadius);
}

/*
=====
LEVEL 3. SETTINGS
=====
*/

.demo{
  --paginationAlign: center;
  --paginationFontSize: 1.6rem;
  --paginationItemActiveBgColor: #4557bb;
  --paginationItemTextColor: #0094d9;
  --paginationItemActiveTextColor: #fff;
}

.demo:nth-of-type(2), .demo:nth-of-type(4){
  --paginationItemTextColor: #0094d9;
  --paginationItemActiveTextColor: #4557bb;
  --paginationItemActiveBgColor: #fff;
  --paginationItemActiveBorderColor: #4557bb;  
  --paginationItemActiveBorderWidth: 2px;
}

.demo:nth-of-type(3), .demo:nth-of-type(4){
  --paginationItemBorderRadius: 50%;
}

.demo:nth-of-type(5){
  --paginationItemBorderRadius: 2px;
}

.demo:nth-of-type(6){
  --paginationArrowIndent: 5px;
  --paginationItemPadding: 10px 15px;
  --paginationItemTextColor: #fff;
  --paginationItemActiveBgColor: #5668ca;
}

.demo:nth-of-type(6) .pagination{
  background-color: #4557bb;  
}
            
          
!
999px
Loading ..................

Console