<div id="app">
<div ><img ref="fullscreen" src="https://cdn.pixabay.com/photo/2020/03/26/10/51/norway-4970019_1280.jpg" alt=""></div>
<button v-on:click="fullscreen">fullscreen</button>
</div>
img{
width: 400px;
max-width:100%;
}
let app=new Vue({
el: "#app",
data: {
},
methods: {
fullscreen:function(){
this.$refs.fullscreen.requestFullscreen()
}
}
})
This Pen doesn't use any external CSS resources.