• 简单漂亮的首页


    效果图

     

    说明 

        这个首页我也是构思了很久,才想出这个界面,大家喜欢的话,可以拿走去使用

    技术的话,采用的就是vue的语法,但是不影响,很多样式我都是直接手敲出来的

    代码实现

    标语

    1. <div class="text">
    2. <p><span>Do something you love.span>p>
    3. <p>"Success is not final, failure is not fatal: it is the courage to continue that counts."p>
    4. div>
    1. .text {
    2. padding-top: 300px;
    3. text-align: center;
    4. height: 600px;
    5. p {
    6. color: #dbedf2;
    7. font-size: 28px;
    8. margin-bottom: 20px;
    9. span {
    10. font-size: 50px;
    11. color: white;
    12. }
    13. }
    14. }

     

    卡片

    1. <!-- 卡片 start-->
    2. <div class="card">
    3. <!-- 卡片列表 start-->
    4. <div class="card-list">
    5. <div class="card-item">
    6. <el-icon class="card-icon" size="80px">
    7. <Sunny/>
    8. </el-icon>
    9. <p><span>{{ cardList[0].title }}</span></p>
    10. <p>{{ cardList[0].content }}</p>
    11. <button>{{ cardList[0].button }}</button>
    12. </div>
    13. <div class="card-item">
    14. <el-icon class="card-icon" size="80px">
    15. <Ship/>
    16. </el-icon>
    17. <p><span>{{ cardList[1].title }}</span></p>
    18. <p>{{ cardList[1].content }}</p>
    19. <button>{{ cardList[1].button }}</button>
    20. </div>
    21. <div class="card-item">
    22. <el-icon class="card-icon" size="80px">
    23. <Sunrise/>
    24. </el-icon>
    25. <p><span>{{ cardList[2].title }}</span></p>
    26. <p>{{ cardList[2].content }}</p>
    27. <button>{{ cardList[2].button }}</button>
    28. </div>
    29. </div>
    30. <!-- 卡片列表 end-->
    31. <!-- 斜块 start-->
    32. <div class="tilt"></div>
    33. <!-- 斜块 start-->
    34. <!-- 视频 start-->
    35. <div class="video">
    36. <p>WATCH THE VIDEO</p>
    37. <el-icon @click="videoActive=!videoActive" class="video-icon">
    38. <VideoPlay/>
    39. </el-icon>
    40. <el-dialog v-model="videoActive" show-close>
    41. <vue3VideoPlay v-bind="options"/>
    42. </el-dialog>
    43. </div>
    44. <!-- 视频 start-->
    45. </div>
    46. <!-- 卡片 end-->
    1. .card {
    2. .tilt {
    3. background-color: #fff;
    4. height: 750px;
    5. transform: skewY(-1.5deg); /* 使顶部向左倾斜10度 */
    6. }
    7. .card-list {
    8. margin-left: 10%;
    9. position: absolute;
    10. z-index: 9;
    11. margin-top: -100px;
    12. display: flex;
    13. .card-item {
    14. background-color: #fff;
    15. height: 400px;
    16. width: 400px;
    17. box-shadow: 7px 14px 42px 3px rgb(163 174 184 / 40%);
    18. .card-icon {
    19. margin-top: 40px;
    20. margin-left: 41%;
    21. color: #52d3aa;
    22. }
    23. p {
    24. text-align: center;
    25. line-height: 30px;
    26. font-size: 17px;
    27. margin-top: 20px;
    28. margin-left: 10%;
    29. margin-right: 10%;
    30. span {
    31. font-size: 28px;
    32. }
    33. }
    34. button {
    35. margin-top: 20px;
    36. margin-left: 30%;
    37. width: 40%;
    38. border-radius: 5px;
    39. background: #52d3aa;
    40. color: #fff;
    41. border: none !important;
    42. border: 10px solid transparent !important;
    43. text-transform: uppercase;
    44. letter-spacing: 2px;
    45. }
    46. button:hover {
    47. cursor: pointer;
    48. background: #fff;
    49. color: #52d3aa;
    50. }
    51. }
    52. .card-item:hover {
    53. background-image: url("@/assets/image/背景图片/img_7.jpg");
    54. background-size: cover;
    55. color: #fff;
    56. .card-icon {
    57. color: #fff !important;
    58. }
    59. }
    60. }
    61. .video {
    62. position: absolute;
    63. z-index: 9;
    64. margin-top: -340px;
    65. margin-left: 38%;
    66. p {
    67. font-size: 24px;
    68. font-weight: bolder;
    69. color: #7f7f7f;
    70. }
    71. .video-icon {
    72. margin-top: 30px;
    73. margin-left: 40px;
    74. font-size: 150px;
    75. color: #52d3aa;
    76. }
    77. .video-icon:hover {
    78. cursor: pointer;
    79. font-size: 153px;
    80. }
    81. }
    82. }

    图片墙

    1. <!-- 图片墙 start-->
    2. <div class="work">
    3. <div class="work-title">
    4. <p><span>图片墙</span></p>
    5. <hr/>
    6. <p>
    7. 图片墙记录着我们团队的欢笑、汗水和努力。在这里,你可以看到我们团队成员充满激情地合作、创新和研发出优秀的产品。这些照片展示了多元化的团队文化,我们鼓励员工发挥创造力,分享彼此的成功和成长。
    8. </p>
    9. </div>
    10. <div class="picture-list">
    11. <div @click="showImage(index)" class="picture-item" v-for="(item,index) in imgList.list" :key="index">
    12. <el-image class="image" fit="cover" :src="item.bannerUrl"></el-image>
    13. <p><span>{{ item.bannerData1 }}</span></p>
    14. <p>{{ item.bannerData2 }}</p>
    15. </div>
    16. <el-dialog v-model="showImageActive">
    17. <el-image style="width: 100%;height: 500px;border-radius: 5px" fit="cover"
    18. :src="imgDesc.bannerUrl"></el-image>
    19. </el-dialog>
    20. </div>
    21. </div>
    22. <!-- 图片墙 end-->
    1. .work {
    2. margin-top: 100px;
    3. margin-bottom: 300px;
    4. .work-title {
    5. text-align: center;
    6. margin-left: 25%;
    7. margin-right: 25%;
    8. p {
    9. color: #daedf7;
    10. font-size: 25px;
    11. line-height: 50px;
    12. span {
    13. color: #ffffff;
    14. font-size: 50px;
    15. }
    16. }
    17. hr {
    18. margin-top: 30px;
    19. margin-bottom: 30px;
    20. width: 4%;
    21. }
    22. }
    23. .picture-list {
    24. margin-top: 100px;
    25. margin-left: 10%;
    26. width: 100%;
    27. display: flex;
    28. flex-wrap: wrap; //自动换行
    29. .picture-item {
    30. border-radius: 8px;
    31. background-color: #fff;
    32. height: 370px;
    33. width: 370px;
    34. margin: 20px;
    35. .image {
    36. border-radius: 8px 8px 0 0;
    37. height: 300px;
    38. width: 100%;
    39. }
    40. p {
    41. text-align: center;
    42. line-height: 30px;
    43. color: #b3b3b3;
    44. font-size: 16px;
    45. span {
    46. font-weight: bolder;
    47. color: #000000;
    48. }
    49. span:hover {
    50. color: #57d4ac;
    51. }
    52. }
    53. }
    54. .picture-item:hover {
    55. box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
    56. margin-top: -1px;
    57. cursor: pointer;
    58. }
    59. }
    60. }

    理念

    1. <!-- 理念 start-->
    2. <div class="evaluate">
    3. <!-- 斜块 start-->
    4. <div class="tilt"></div>
    5. <!-- 斜块 start-->
    6. <div class="title">
    7. <p><span>理念</span></p>
    8. <hr color="#52d3aa">
    9. <p>我们的理念是通过技术与人文的结合,解决现实生活中的问题,推动社会的进步和发展。</p>
    10. <p>
    11. 我们相信,现代互联网技术可以拓展人类的视野,打破地域的限制,让人们更加便捷地获取信息、交流和合作。通过创新,我们为客户提供前瞻性的产品和服务,帮助他们在激烈的市场竞争中脱颖而出。</p>
    12. </div>
    13. </div>
    14. <!-- 理念 end-->
    1. .work {
    2. margin-top: 100px;
    3. margin-bottom: 300px;
    4. .work-title {
    5. text-align: center;
    6. margin-left: 25%;
    7. margin-right: 25%;
    8. p {
    9. color: #daedf7;
    10. font-size: 25px;
    11. line-height: 50px;
    12. span {
    13. color: #ffffff;
    14. font-size: 50px;
    15. }
    16. }
    17. hr {
    18. margin-top: 30px;
    19. margin-bottom: 30px;
    20. width: 4%;
    21. }
    22. }
    23. .picture-list {
    24. margin-top: 100px;
    25. margin-left: 10%;
    26. width: 100%;
    27. display: flex;
    28. flex-wrap: wrap; //自动换行
    29. .picture-item {
    30. border-radius: 8px;
    31. background-color: #fff;
    32. height: 370px;
    33. width: 370px;
    34. margin: 20px;
    35. .image {
    36. border-radius: 8px 8px 0 0;
    37. height: 300px;
    38. width: 100%;
    39. }
    40. p {
    41. text-align: center;
    42. line-height: 30px;
    43. color: #b3b3b3;
    44. font-size: 16px;
    45. span {
    46. font-weight: bolder;
    47. color: #000000;
    48. }
    49. span:hover {
    50. color: #57d4ac;
    51. }
    52. }
    53. }
    54. .picture-item:hover {
    55. box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
    56. margin-top: -1px;
    57. cursor: pointer;
    58. }
    59. }
    60. }

    全部代码

    1. <template>
    2. <div class="container">
    3. <div class="text">
    4. <p><span>Do something you love.span>p>
    5. <p>"Success is not final, failure is not fatal: it is the courage to continue that counts."p>
    6. div>
    7. <div class="card">
    8. <div class="card-list">
    9. <div class="card-item">
    10. <el-icon class="card-icon" size="80px">
    11. <Sunny/>
    12. el-icon>
    13. <p><span>{{ cardList[0].title }}span>p>
    14. <p>{{ cardList[0].content }}p>
    15. <button>{{ cardList[0].button }}button>
    16. div>
    17. <div class="card-item">
    18. <el-icon class="card-icon" size="80px">
    19. <Ship/>
    20. el-icon>
    21. <p><span>{{ cardList[1].title }}span>p>
    22. <p>{{ cardList[1].content }}p>
    23. <button>{{ cardList[1].button }}button>
    24. div>
    25. <div class="card-item">
    26. <el-icon class="card-icon" size="80px">
    27. <Sunrise/>
    28. el-icon>
    29. <p><span>{{ cardList[2].title }}span>p>
    30. <p>{{ cardList[2].content }}p>
    31. <button>{{ cardList[2].button }}button>
    32. div>
    33. div>
    34. <div class="tilt">div>
    35. <div class="video">
    36. <p>WATCH THE VIDEOp>
    37. <el-icon @click="videoActive=!videoActive" class="video-icon">
    38. <VideoPlay/>
    39. el-icon>
    40. <el-dialog v-model="videoActive" show-close>
    41. <vue3VideoPlay v-bind="options"/>
    42. el-dialog>
    43. div>
    44. div>
    45. <div class="work">
    46. <div class="work-title">
    47. <p><span>图片墙span>p>
    48. <hr/>
    49. <p>
    50. 图片墙记录着我们团队的欢笑、汗水和努力。在这里,你可以看到我们团队成员充满激情地合作、创新和研发出优秀的产品。这些照片展示了多元化的团队文化,我们鼓励员工发挥创造力,分享彼此的成功和成长。
    51. p>
    52. div>
    53. <div class="picture-list">
    54. <div @click="showImage(index)" class="picture-item" v-for="(item,index) in imgList.list" :key="index">
    55. <el-image class="image" fit="cover" :src="item.bannerUrl">el-image>
    56. <p><span>{{ item.bannerData1 }}span>p>
    57. <p>{{ item.bannerData2 }}p>
    58. div>
    59. <el-dialog v-model="showImageActive">
    60. <el-image style="width: 100%;height: 500px;border-radius: 5px" fit="cover"
    61. :src="imgDesc.bannerUrl">el-image>
    62. el-dialog>
    63. div>
    64. div>
    65. <div class="evaluate">
    66. <div class="tilt">div>
    67. <div class="title">
    68. <p><span>理念span>p>
    69. <hr color="#52d3aa">
    70. <p>我们的理念是通过技术与人文的结合,解决现实生活中的问题,推动社会的进步和发展。p>
    71. <p>
    72. 我们相信,现代互联网技术可以拓展人类的视野,打破地域的限制,让人们更加便捷地获取信息、交流和合作。通过创新,我们为客户提供前瞻性的产品和服务,帮助他们在激烈的市场竞争中脱颖而出。p>
    73. div>
    74. div>
    75. div>
    76. template>
    77. <script setup>
    78. import {onMounted, reactive, ref} from "vue";
    79. import 'vue3-video-play/dist/style.css'
    80. import axios from "@/api/index";
    81. //初始化视频对话框
    82. const videoActive = ref(false)
    83. //图片
    84. const showImageActive = ref(false)
    85. //初始化卡片数据
    86. const cardList = reactive([
    87. {
    88. icon: '',
    89. title: '创意',
    90. content: '创新力是我们的翅膀,驱动我们超越边界,开创全新的未来。激发创新思维,释放潜能,让创意翻飞,颠覆现状。因为创新,所以精彩。',
    91. button: 'originality',
    92. },
    93. {
    94. icon: '',
    95. title: '探索',
    96. content: '在探索的旅程中,我们发现真正的力量来自于勇往直前的勇气。无畏地掌握新知识,拥抱新技术,我们追逐未知的可能性。',
    97. button: 'explore',
    98. },
    99. {
    100. icon: '',
    101. title: '愿景',
    102. content: '无论是在科技创新、社会变革还是环境保护的领域,我们秉持着超越极限,引领潮流的信念。在我们的愿景中,没有不可能,只有争取。',
    103. button: 'vision',
    104. },
    105. ])
    106. //初始化图片数据
    107. const imgList = reactive({list: []})
    108. //初始图片基础信息
    109. const imgDesc = reactive({
    110. src: ''
    111. })
    112. //视频参数
    113. const options = reactive({
    114. width: "720px", //播放器宽度
    115. height: "470px", //播放器高度
    116. color: "#409eff", //主题色
    117. title: "测试", //视频名称
    118. src: "http://118.31.60.184:8020/月木学途/接口测试/1.接口测试基础.mp4", //视频源
    119. muted: false, //静音
    120. speed: false, // 关闭进度条拖动
    121. webFullScreen: false,
    122. speedRate: ["0.75", "1.0", "1.25", "1.5", "2.0"], //播放倍速
    123. autoPlay: false, //自动播放
    124. loop: false, //循环播放
    125. mirror: false, //镜像画面
    126. ligthOff: false, //关灯模式
    127. volume: 0.3, //默认音量大小
    128. control: true, //是否显示控制
    129. controlBtns: [
    130. "audioTrack",
    131. "quality",
    132. "speedRate",
    133. "volume",
    134. "setting",
    135. "pip",
    136. "pageFullScreen",
    137. "fullScreen",
    138. ], //显示所有按钮,
    139. });
    140. onMounted(() => {
    141. axios.banner_findByTypeId(
    142. {
    143. bannerTypeId: 2
    144. }
    145. ).then(res => {
    146. if (res.data.code == 200) {
    147. imgList.list = res.data.data
    148. }
    149. })
    150. })
    151. /**
    152. * 展现图片
    153. */
    154. const showImage = (index) => {
    155. showImageActive.value = true
    156. imgDesc.bannerUrl = imgList.list[index].bannerUrl
    157. }
    158. script>
    159. <style scoped lang="scss">
    160. .container {
    161. background-image: -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0, #3f95ea), color-stop(1, #52d3aa));
    162. background-image: -webkit-repeating-linear-gradient(top left, #3f95ea 0%, #52d3aa 100%);
    163. background-image: repeating-linear-gradient(to bottom right, #3f95ea 0%, #52d3aa 100%);
    164. background-image: -ms-repeating-linear-gradient(top left, #3f95ea 0%, #52d3aa 100%);
    165. padding-bottom: 200px;
    166. .text {
    167. padding-top: 300px;
    168. text-align: center;
    169. height: 600px;
    170. p {
    171. color: #dbedf2;
    172. font-size: 28px;
    173. margin-bottom: 20px;
    174. span {
    175. font-size: 50px;
    176. color: white;
    177. }
    178. }
    179. }
    180. .card {
    181. .tilt {
    182. background-color: #fff;
    183. height: 750px;
    184. transform: skewY(-1.5deg); /* 使顶部向左倾斜10度 */
    185. }
    186. .card-list {
    187. margin-left: 10%;
    188. position: absolute;
    189. z-index: 9;
    190. margin-top: -100px;
    191. display: flex;
    192. .card-item {
    193. background-color: #fff;
    194. height: 400px;
    195. width: 400px;
    196. box-shadow: 7px 14px 42px 3px rgb(163 174 184 / 40%);
    197. .card-icon {
    198. margin-top: 40px;
    199. margin-left: 41%;
    200. color: #52d3aa;
    201. }
    202. p {
    203. text-align: center;
    204. line-height: 30px;
    205. font-size: 17px;
    206. margin-top: 20px;
    207. margin-left: 10%;
    208. margin-right: 10%;
    209. span {
    210. font-size: 28px;
    211. }
    212. }
    213. button {
    214. margin-top: 20px;
    215. margin-left: 30%;
    216. width: 40%;
    217. border-radius: 5px;
    218. background: #52d3aa;
    219. color: #fff;
    220. border: none !important;
    221. border: 10px solid transparent !important;
    222. text-transform: uppercase;
    223. letter-spacing: 2px;
    224. }
    225. button:hover {
    226. cursor: pointer;
    227. background: #fff;
    228. color: #52d3aa;
    229. }
    230. }
    231. .card-item:hover {
    232. background-image: url("@/assets/image/背景图片/img_7.jpg");
    233. background-size: cover;
    234. color: #fff;
    235. .card-icon {
    236. color: #fff !important;
    237. }
    238. }
    239. }
    240. .video {
    241. position: absolute;
    242. z-index: 9;
    243. margin-top: -340px;
    244. margin-left: 38%;
    245. p {
    246. font-size: 24px;
    247. font-weight: bolder;
    248. color: #7f7f7f;
    249. }
    250. .video-icon {
    251. margin-top: 30px;
    252. margin-left: 40px;
    253. font-size: 150px;
    254. color: #52d3aa;
    255. }
    256. .video-icon:hover {
    257. cursor: pointer;
    258. font-size: 153px;
    259. }
    260. }
    261. }
    262. .work {
    263. margin-top: 100px;
    264. margin-bottom: 300px;
    265. .work-title {
    266. text-align: center;
    267. margin-left: 25%;
    268. margin-right: 25%;
    269. p {
    270. color: #daedf7;
    271. font-size: 25px;
    272. line-height: 50px;
    273. span {
    274. color: #ffffff;
    275. font-size: 50px;
    276. }
    277. }
    278. hr {
    279. margin-top: 30px;
    280. margin-bottom: 30px;
    281. width: 4%;
    282. }
    283. }
    284. .picture-list {
    285. margin-top: 100px;
    286. margin-left: 10%;
    287. width: 100%;
    288. display: flex;
    289. flex-wrap: wrap; //自动换行
    290. .picture-item {
    291. border-radius: 8px;
    292. background-color: #fff;
    293. height: 370px;
    294. width: 370px;
    295. margin: 20px;
    296. .image {
    297. border-radius: 8px 8px 0 0;
    298. height: 300px;
    299. width: 100%;
    300. }
    301. p {
    302. text-align: center;
    303. line-height: 30px;
    304. color: #b3b3b3;
    305. font-size: 16px;
    306. span {
    307. font-weight: bolder;
    308. color: #000000;
    309. }
    310. span:hover {
    311. color: #57d4ac;
    312. }
    313. }
    314. }
    315. .picture-item:hover {
    316. box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
    317. margin-top: -1px;
    318. cursor: pointer;
    319. }
    320. }
    321. }
    322. .evaluate {
    323. .tilt {
    324. background-color: #fff;
    325. height: 600px;
    326. transform: skewY(-1.5deg); /* 使顶部向左倾斜10度 */
    327. }
    328. .title {
    329. margin-top: -500px;
    330. position: absolute;
    331. text-align: center;
    332. margin-left: 25%;
    333. margin-right: 25%;
    334. p {
    335. color: #929292;
    336. font-size: 25px;
    337. line-height: 50px;
    338. span {
    339. color: #444444;
    340. font-size: 50px;
    341. }
    342. }
    343. hr {
    344. margin-top: 30px;
    345. margin-bottom: 30px;
    346. width: 4%;
    347. }
    348. }
    349. }
    350. }
    351. style>

  • 相关阅读:
    一、基本remix环境及HelloWord contract《2022 solidity8.+ 版本教程到实战》
    1. 什么是微服务 ?
    视错觉与魔术(一)——经典回顾
    LCP 66.最小展台数量
    HDMI之EDID
    Docker的网络模式 (4+1)
    戴建业作品集读书笔记
    nodejs设置镜像
    爬虫之re数据清洗
    Windows右键没有新建Word、PPT与Excel的解决方法
  • 原文地址:https://blog.csdn.net/m0_63040701/article/details/134473629