Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. <template>
  2. <div>
  3. <div id="image1div">
  4. <button class="button button1" onclick="openForm()"></button>
  5. <img src="../Assets/taske.png" class="image1">
  6. </div>
  7. <div id="image2div">
  8. <img src="../Assets/taske.png" class="image2">
  9. <img src="../Assets/taske.png" class="image3">
  10.  
  11. </div>
  12. <div id="image3div">
  13. <img src="../Assets/taske.png" class="image4">
  14. <img src="../Assets/taske.png" class="image5">
  15.  
  16. </div>
  17.  
  18. <div id="image4div">
  19. <img src="../Assets/taske.png" class="image6">
  20. </div>
  21.  
  22. <div id="contactForm">
  23. <h1>Keep in touch!</h1>
  24. <small>I'll get back to you as quickly as possible</small>
  25.  
  26. <form action="#">
  27. <input placeholder="Name" type="text" required>
  28. <input placeholder="Email" type="email" required>
  29. <input placeholder="Subject" type="text" required>
  30. <textarea placeholder="Comment"></textarea>
  31. <input class="formBtn" type="submit">
  32. <input class="formBtn" type="reset">
  33. </form>
  34. </div>
  35. </div>
  36. </template>
  37.  
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. contactformVisible: false
  43. };
  44. },
  45. methods:{
  46. openForm(){
  47. var ele = document.getElementById("contactForm");
  48.  
  49. if(this.contactformVisible){
  50. ele.style = "opacity: 0"
  51. }
  52. else ele.style = "opacity: 1"
  53.  
  54. this.contactformVisible = !this.contactformVisible;
  55.  
  56. }
  57. }
  58. }
  59. </script>
  60.  
  61.  
  62.  
  63. <style <style lang="scss" scoped>
  64.  
  65.  
  66. #image1div{
  67. background-color: red;
  68. }
  69.  
  70. #image2div{
  71. background-color: blue;
  72.  
  73. }
  74. #image3div{
  75. background-color: green;
  76.  
  77. }
  78. #image4div{
  79. background-color: red;
  80. }
  81. .image1{
  82. height: 100px;
  83. width: 100px;
  84. display: block;
  85. margin-left: auto;
  86. margin-right: auto;
  87. }
  88.  
  89. .image2{
  90. height: 100px;
  91. width: 100px;
  92. padding-left: 200px;
  93. }
  94.  
  95. .image3{
  96. height: 100px;
  97. width: 100px;
  98. float: right;
  99. padding-right: 200px;
  100. }
  101.  
  102. .image4{
  103. height: 100px;
  104. width: 100px;
  105. padding-left: 200px;
  106. padding-top: 100px;
  107. }
  108.  
  109. .image5{
  110. height: 100px;
  111. width: 100px;
  112. float: right;
  113. padding-right: 200px;
  114. padding-top: 100px;
  115.  
  116. }
  117.  
  118. .image6{
  119. height: 100px;
  120. width: 100px;
  121. display: block;
  122. margin-left: auto;
  123. margin-right: auto;
  124. }
  125.  
  126. .button{
  127. height: 20px;
  128. width: 20px;
  129. border-radius: 50%;
  130. margin-left: 500px;
  131. }
  132.  
  133.  
  134.  
  135. #contactForm {
  136. display: block;
  137. opacity: 0;
  138. border: 6px solid salmon;
  139. padding: 2em;
  140. width: 400px;
  141. text-align: center;
  142. background: #fff;
  143. position: fixed;
  144. top:50%;
  145. left:50%;
  146. transform: translate(-50%,-50%);
  147. -webkit-transform: translate(-50%,-50%);
  148. -webkit-transition: opacity 1s ease-in;
  149. -moz-transition: opacity 1s ease-in;
  150. -o-transition: opacity 1s ease-in;
  151. -ms-transition: opacity 1s ease-in;
  152. transition: opacity 1s ease-in;
  153.  
  154. }
  155.  
  156. input, textarea {
  157. margin: .8em auto;
  158. font-family: inherit;
  159. text-transform: inherit;
  160. font-size: inherit;
  161.  
  162. display: block;
  163. width: 280px;
  164. padding: .4em;
  165. }
  166. textarea { height: 80px; resize: none; }
  167.  
  168. .formBtn {
  169. width: 140px;
  170. display: inline-block;
  171.  
  172. background: teal;
  173. color: #fff;
  174. font-weight: 100;
  175. font-size: 1.2em;
  176. border: none;
  177. height: 30px;
  178. }
  179. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement