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

              
                <!--
  Forked from:
  http://localhost:8081/examples#example-Nudge
-->
<div id="q-app">
  <div class="q-ma-md row justify-evenly" style="max-width: 700px; width: 100%;">
  
      <div class="q-ma-md row justify-center items-center full-width">
        <q-toggle v-model="hover" label="Toggle Hover" ></q-toggle>
        <q-toggle v-model="active" label="Toggle Transitions" ></q-toggle>
      </div>
  
      <div class="description text-center rounded-borders">
        <q-flashcard :no-hover="hover" :style="style">
          <q-flashcard-section transition="nudge-in" :active="active">
            <img :src="getImage(0)" width=300 height=200>
          </q-flashcard-section>
        </q-flashcard>
        <div class="text-h5 q-pt-sm">transition="nudge-in"</div>
      </div>
  
      <div class="description text-center rounded-borders">
        <q-flashcard :no-hover="hover" :style="style">
          <q-flashcard-section transition="nudge-out" :active="active">
            <img :src="getImage(1)" width=300 height=200>
          </q-flashcard-section>
        </q-flashcard>
        <div class="text-h5 q-pt-sm">transition="nudge-out"</div>
      </div>
  
    </div>
</div>
              
            
!

CSS

              
                .description
  padding: 10px
  background-color: black
  color: white
  box-shadow: 1px 1px 2px #e6e6e6

.my-header
  width: 100%
  top: 0
  height: 45px
  color: white
  background-color: rgba(0,0,0,0.8)
  text-transform: uppercase
  text-align: center
  font-size: 17px
  margin: 20px 0 0 0
  padding: 10px

.my-text
  width: 100%
  top: 0
  height: 80px
  color: white
  text-align: center
  font-size: 12px
  margin: 60px 0 0 0
  padding: 20px
  line-height: normal
  font-family: Georgia, serif
  font-style: italic

.my-button-container
  width: 100%

.my-button
  text-decoration: none
  text-transform: uppercase
  margin: 0 0 20px 0
  text-align: center
  padding: 7px 14px
  background-color: #000
  color: #fff
  text-transform: uppercase
  box-shadow: 0 0 1px #000
  transition-delay: 0.2s

.my-button:hover
  box-shadow: 0 0 5px #000
              
            
!

JS

              
                new Vue({
  el: '#q-app',
  data () {
    return {
      hover: false,
      active: false
    }
  },

  computed: {
    style () {
      return {
        width: '320px',
        height: '220px',
        backgroundImage: `url('statics/bgimg.jpg')`, // eslint-disable-line
        padding: '10px',
        border: '10px solid #fff',
        textAlign: 'center',
        boxShadow: '1px 1px 2px #e6e6e6'
      }
    }
  },

  methods: {
    getImage (index) {
      if (index % 2) {
        return 'https://raw.githubusercontent.com/quasarframework/app-extension-qflashcard/dev/demo/src/statics/1.jpg'
      }
      return 'https://raw.githubusercontent.com/quasarframework/app-extension-qflashcard/dev/demo/src/statics/2.jpg'
    }
  }
})
              
            
!
999px

Console