LoginSignup
0
0

More than 1 year has passed since last update.

文字をhoverすると画像が表示されるようにする

Posted at
index.vue
<template>
 <div>
  <p>
   <a href="#" class="Art__viewer">Test
    <span><img src="~@/assets/images/Main/****.jpg" alt=""></span>
   </a>
  </p>
 </div>
</template>

<style>
.Art__viewer:hover {
  position: relative;
    text-decoration: none;
}
.Art__viewer span {
  display: none;
    position: absolute;
    top: -200px;
    left: 150px;
}
.Art__viewer:hover span {
    border: none;
    display: block;
    width: 210px;
}
</style>

参考:
https://www.cmons.me/entry/2015/08/21/005115

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0