News.vue 5.4 KB

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