News.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <template>
  2. <div class="news" style="overflow:hidden">
  3. <div class="imgarea">
  4. <img :src="img1" alt class="widthimg" />
  5. <div class="imgtext">
  6. <h1>新闻中心</h1>
  7. <h2>NEWS CENTER</h2>
  8. </div>
  9. </div>
  10. <div class="newscenter">
  11. <div class="newscenterhead">
  12. <p>新闻中心</p>
  13. <hr />
  14. </div>
  15. <div class="newsblock">
  16. <div class="block">
  17. <img :src="img2" />
  18. <p>心中有code,在哪儿都能改变世界</p>
  19. <p class="day">2019-7-23</p>
  20. </div>
  21. <div class="block">
  22. <img :src="img3" />
  23. <p>两年时间赚了19w,他究竟对芝麻开发做了什么</p>
  24. <p class="day">2019-7-23</p>
  25. </div>
  26. <div class="block">
  27. <img :src="img4" />
  28. <p>数说芝麻开发的2016</p>
  29. <p class="day">2019-7-23</p>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="listcontent">
  34. <div v-for="(item,index) in listnews" :key="index">
  35. <div class="newslist">
  36. <div class="newslistdays">
  37. <p class="days">06-23</p>
  38. <p>2019</p>
  39. </div>
  40. <div class="eachnews">
  41. <p>{{item.head}}</p>
  42. <p class="newscontent">{{item.content}}</p>
  43. </div>
  44. <div>
  45. <p>MORE</p>
  46. </div>
  47. </div>
  48. <hr />
  49. </div>
  50. </div>
  51. <home-footer></home-footer>
  52. </div>
  53. </template>
  54. <script>
  55. import img1 from "../components/img/u305.jpg";
  56. import img2 from "../components/img/u313.png";
  57. import img3 from "../components/img/u314.png";
  58. import img4 from "../components/img/u315.png";
  59. // import img5 from ""
  60. import HomeFooter from '../components/footer.vue'
  61. export default {
  62. name: "News",
  63. // props: {
  64. // msg: String
  65. // }
  66. components: {
  67. HomeFooter
  68. },
  69. data() {
  70. return {
  71. img1: img1,
  72. img2: img2,
  73. img3: img3,
  74. img4: img4,
  75. listnews: [
  76. {
  77. head: "芝麻开发想项目服务透明化,用“工时制”取代“项目制“",
  78. content:
  79. "芝麻开发是一个以提供项目服务为导向的平台。项目服务有 IT 项目,包括网站建设、业务..."
  80. },
  81. {
  82. head: "心中有code,在哪都能改变世界!",
  83. content:
  84. "芝麻开发是一个以提供项目服务为导向的平台。项目服务有 IT 项目,包括网站建设、业务..."
  85. },
  86. {
  87. head: "2年业余时间赚了19w,他究竟在(dui)芝麻开发做了什么?",
  88. content:
  89. "芝麻开发是一个以提供项目服务为导向的平台。项目服务有 IT 项目,包括网站建设、业务..."
  90. },
  91. {
  92. head: "数说芝麻开发的2016",
  93. content:
  94. "芝麻开发是一个以提供项目服务为导向的平台。项目服务有 IT 项目,包括网站建设、业务..."
  95. },
  96. {
  97. head: "【芝麻Discovery】之芝麻勋章",
  98. content:
  99. "芝麻开发是一个以提供项目服务为导向的平台。项目服务有 IT 项目,包括网站建设、业务..."
  100. }
  101. ]
  102. };
  103. }
  104. };
  105. </script>
  106. <style scoped>
  107. *{
  108. text-align: left
  109. }
  110. .imgarea {
  111. position: relative;
  112. width: 100%;
  113. height: 400px;
  114. }
  115. .widthimg {
  116. position: absolute;
  117. width: 100%;
  118. height: 100%;
  119. display: flex;
  120. }
  121. .newslistdays {
  122. color: rgb(204, 204, 204);
  123. font-weight: 600;
  124. }
  125. .newslistdays p {
  126. margin-top: 0px;
  127. margin-bottom: 0px;
  128. }
  129. .listcontent {
  130. margin-top: 30px;
  131. margin-left: 50px;
  132. }
  133. p {
  134. font-size: 19px;
  135. padding-left: 10px;
  136. }
  137. .newscontent {
  138. color: rgb(107, 107, 107);
  139. font-size: 17px;
  140. }
  141. .newslist {
  142. display: flex;
  143. flex-direction: row;
  144. justify-content: space-between;
  145. padding-right: 20px;
  146. }
  147. .eachnews p {
  148. margin-bottom: 0px;
  149. }
  150. .days {
  151. color: rgb(174, 174, 174);
  152. font-size: 35px;
  153. margin-top: 15px !important;
  154. margin-bottom: 0px;
  155. }
  156. .imgtext {
  157. position: absolute;
  158. text-align: center;
  159. vertical-align: middle;
  160. width: 100%;
  161. height: 100%;
  162. display: flex;
  163. flex-direction: column;
  164. justify-content: center;
  165. }
  166. .newscenter {
  167. position: relative;
  168. margin-top: 0%;
  169. }
  170. .newscenterhead{
  171. margin-top:30px
  172. }
  173. .newscenterhead p{
  174. width: 110px;
  175. padding-left: 18px;
  176. display: flex;
  177. justify-content: flex-start;
  178. border-bottom: 1px solid rgb(121, 121, 121);
  179. margin-bottom: -7px;
  180. }
  181. .newsblock {
  182. position: relative;
  183. margin-top: 20px;
  184. display: flex;
  185. flex-direction: row;
  186. justify-content: space-around;
  187. }
  188. .block {
  189. width: 285px;
  190. height: 350px;
  191. display: flex;
  192. flex-direction: column;
  193. justify-content: space-between;
  194. border: 1px solid rgb(154, 154, 154);
  195. border-top: none;
  196. }
  197. .block img {
  198. width: 285px;
  199. height: 188px;
  200. }
  201. .imgtext h1 {
  202. color: black;
  203. margin: auto;
  204. font-size: 60px;
  205. margin-bottom: 25px;
  206. font-weight: 600
  207. }
  208. .imgtext h2 {
  209. color: rgb(102, 102, 102);
  210. margin: auto;
  211. margin-top: 10px;
  212. font-weight: 600
  213. }
  214. hr {
  215. color: rgb(154, 154, 154);
  216. }
  217. </style>