Eswlnk Blog Eswlnk Blog
  • 资源
    • 精彩视频
    • 破解专区
      • WHMCS
      • WordPress主题
      • WordPress插件
    • 其他分享
    • 极惠VPS
    • PDF资源
  • 关于我
    • 论文阅读
    • 关于本站
    • 通知
    • 左邻右舍
    • 玩物志趣
    • 日志
    • 专题
  • 热议话题
    • 游戏资讯
  • 红黑
    • 渗透分析
    • 攻防对抗
    • 代码发布
  • 自主研发
    • 知识库
    • 插件
      • ToolBox
      • HotSpot AI 热点创作
    • 区块
    • 快乐屋
    • 卡密
  • 乱步
    • 文章榜单
    • 热门标签
  • 问答中心反馈
  • 注册
  • 登录
首页 › 代码发布 › 「WordPress开发」资源展示小区块,可用于展示插件/主题

「WordPress开发」资源展示小区块,可用于展示插件/主题

Eswlnk的头像
Eswlnk
2024-04-04 19:31:00
「WordPress开发」资源展示小区块,可用于展示插件/主题-Eswlnk Blog
智能摘要 AI
本文介绍了仿制的一个区块,用于展示主题。区块依赖于「Genesis Custom Blocks PRO」插件,并展示了其在电脑端的效果。HTML代码构建了区块的布局结构,包括左侧的模拟图和右侧的主题描述、价格及按钮区域。CSS代码则定义了区块的样式,如阴影效果、布局比例、字体大小及颜色等,并提供了移动端自适应样式。相关字段图展示了区块中使用的变量和参数。

前言

之前就想要仿一个区块用来展示主题,今天就把他完工,以下是展示效果:

「WordPress开发」资源展示小区块,可用于展示插件/主题-Eswlnk Blog

区块的样式风格是我根据本站主题调的,原样式为以下:

「WordPress开发」资源展示小区块,可用于展示插件/主题-Eswlnk Blog
电脑端

相关代码

区块依赖于「Genesis Custom Blocks PRO」,可通过搜索或者通过以下链接直达区块教程:

Markup

  <div class="theme-container box-shadow">


    <!-- 布局左边 -->
    <div class="theme-mockups">
      <div class="mockup-browser mockup-hover">
        <div class="mockup-dots">
          <i class="dot1"></i>
          <i class="dot2"></i>
          <i class="dot3"></i>
        </div>
        <div class="mockup-poster" style="background-image: url('{{img}}')"></div>
      </div>
    </div>

    <!-- 布局右边 -->

    <div class="theme-description">
      <div class="theme-summary">
        <div class="theme-title">{{name}}</div>
        <div class="theme-desc text-secondary">{{desc}}</div>
        <div class="font-number text-danger"><span class="text-lg">¥</span><span class="text-xxl">{{price}}</span>
        </div>

        <!-- 按钮区域 -->
        <div class="theme-action">
          <div class="theme-flex">
            <div class="button-left">
              <a href="{{left-links}}" target="_blank"
                class="preview">{{left-title}}</a>
            </div>
            <div class="button-right">
              <a class="download" href="{{right-links}}" target="_blank">{{right-title}}</button>
            </div>
          </div>
        </div>
        <!-- 按钮区域 -->

      </div>

    </div>



  </div>

CSS

.mockup-hover:hover {
  box-shadow: 0 10px 40px 0 rgb(6 14 44 / 10%);
  transform: translateY(-15px);
}
.theme-mockups {
  position: relative;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 58.33333333%;
}

.mockup-browser {
  position: relative;
  overflow: hidden;
  padding-top: 30px;
  border-radius: 9px;
  transition: all 0.25s cubic-bezier(0.37, 0.31, 0.2, 0.85);
}

.mockup-browser .mockup-poster {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: 100%;
  background-position: top;
}

.mockup-poster {
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
}

.mockup-hover {
  transform: translateZ(0);
  box-shadow: 0 10px 30px 0 rgb(6 14 44 / 5%);
}

.mockup-browser::before {
  content: '';
  top: 0px;
  left: 0px;
  width: 100%;
  height: 30px;
  position: absolute;
  background: #f0f2f7;
  background: linear-gradient(180deg, #f0f2f7, #fff);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.mockup-dots {
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  top: 15px;
  left: 15px;
  margin: -5px 0 0;
  z-index: 9999;
}

.mockup-dots i.dot1 {
  background-color: #ff5f52;
}

.mockup-dots i.dot2 {
  background-color: #ffbe05;
  margin: 0 0.5rem;
}

.mockup-dots i.dot3 {
  background-color: #15cc35;
}

.mockup-dots i.dot1,
.mockup-dots i.dot2,
.mockup-dots i.dot3 {
  width: 10px;
  height: 10px;
  border-radius: 10px;
}

.mockup-browser:after {
  content: '';
  display: block;
  padding-top: 66.66666%;
}

.theme-container {
  display: flex;
  margin: 0 auto;
  justify-content: space-between;
  padding: 20px;
}

.theme-description {
  width: 40%;
  padding-left: 20px;
}

.theme-description .theme-title {
  margin-block-start: 0.83em;
  margin-block-end: 0.83em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  font-weight: bold;
  unicode-bidi: isolate;
  font-size: 2.75rem;
  line-height: 1.4;
  margin-top: 0;
}

.text-secondary {
  color: #575e68 !important;
  --bs-text-opacity: 1;
}

.text-danger {
  color: #ff4636 !important;
  --bs-text-opacity: 1;
}

.text-lg {
  font-size: 1.25rem;
}

.text-xxl {
  font-size: 1.75rem;
}

.mt-3 {
  margin-top: auto;
}

.theme-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3; /* 控制显示的行数 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%; /* 设置文本容器的宽度 */
  margin-bottom: 25px;
}

.theme-action {
  margin-top: 30px;
}

.theme-action .theme-flex {
  display: flex;
  flex-wrap: wrap;
}

.theme-action .button-left,
.theme-action .button-right {
  -webkit-box-flex: 1;
  -ms-flex: 1 0 0%;
  flex: 1 0 0%;
}

.theme-action a {
  text-decoration: none;
}

.button-left .preview,
.button-right .download {
  color: #fff;
  background-color: #20232b;
  border-color: #20232b;
  display: block;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding: 0.75rem 2.5rem;
  font-size: 0.825rem;
  border-radius: 4rem;
  margin-right: 0.5rem !important;
  text-align: center;
}

.button-right .download {
  background-color: #ff4636;
  border-color: #ff4636;
}

.button-left .preview:hover,
.button-right .download:hover {
  box-shadow: none !important;
}

.button-left .preview:hover {
  color: #fff;
  background-color: #575e68;
  border-color: #575e68;
}

.button-right .download:hover {
  color: #fff;
  background-color: #ff4636;
  border-color: #ff4636;
  opacity: 0.8;
}

.box-shadow {
  box-shadow: 0 10px 30px 0 rgb(6 14 44 / 5%);
  border-radius: 4px;
}


/* 手机端自适应 */

@media (max-width: 767.98px) {
  .theme-mockups{
    width: 100%;
  }

  .theme-description{
    width: 100%;
  }

  .theme-description .theme-title{
    margin-top: 12px;
    margin-bottom: 10px;
  }

  .theme-desc{
    margin-top: 0;
    margin-bottom: 0;
  }

  .theme-action{
    margin-top: 10px;
  }
  
  .theme-container{
     flex-wrap:wrap;
  }

}

相关字段

「WordPress开发」资源展示小区块,可用于展示插件/主题-Eswlnk Blog
本站默认网盘访问密码:1166
本站默认网盘访问密码:1166
WordPress主题区块插件资源
35
1
Eswlnk的头像
Eswlnk
一个有点倒霉的研究牲站长
赞赏
「主题改造」Typecho使用highlight.js代码高亮实现代码行号
上一篇
「代码分享」配置 Nuxt3 SEO | 站点地图 sitemap.xml 和 robots.txt
下一篇

评论 (1)

请登录以参与评论
现在登录
  • 的头像
    Eswlnk

    如果不合适请自行修改相关的css

    2 年前 • 111.6.*.* • Google Chrome Windows • 回复

猜你喜欢

  • 插件分享:新增自助购买卡密功能
  • 主题改造计划:手动模块化网站首页
  • 「插件分享」WP Migrate DB Pro | WordPress数据一键迁移工具
  • 「日志记录」逆向必应翻译网页版API实现免费调用
  • 「代码分享」第三方平台VIP视频解析API接口
Eswlnk的头像

Eswlnk

一个有点倒霉的研究牲站长
1108
文章
319
评论
679
获赞

随便看看

WordPress如何在评论栏添加评论者IP归属地
2021-05-30 17:43:29
「WordPress插件」Perfmatters | WordPress性能优化插件
2022-09-07 14:58:50
「WordPress」AIOmatic | 自动 AI 内容编写器
2023-01-21 21:16:16

专题展示

WordPress53

工程实践37

热门标签

360 AI API CDN java linux Nginx PDF PHP python SEO Windows WordPress 云服务器 云服务器知识 代码 免费 安全 安卓 工具 开发日志 微信 微软 手机 插件 攻防 攻防对抗 教程 日志 渗透分析 源码 漏洞 电脑 破解 系统 编程 网站优化 网络 网络安全 脚本 苹果 谷歌 软件 运维 逆向
  • 首页
  • 知识库
  • 地图
Copyright © 2023-2025 Eswlnk Blog. Designed by XiaoWu.
本站CDN由 壹盾安全 提供高防CDN安全防护服务
蜀ICP备20002650号-10
页面生成用时 0.953 秒   |  SQL查询 28 次
本站勉强运行:
友情链接: Eswlnk Blog 网站渗透 倦意博客 特资啦!个人资源分享站 祭夜博客 iBAAO壹宝头条
  • WordPress142
  • 网络安全64
  • 漏洞52
  • 软件52
  • 安全48
现在登录
  • 资源
    • 精彩视频
    • 破解专区
      • WHMCS
      • WordPress主题
      • WordPress插件
    • 其他分享
    • 极惠VPS
    • PDF资源
  • 关于我
    • 论文阅读
    • 关于本站
    • 通知
    • 左邻右舍
    • 玩物志趣
    • 日志
    • 专题
  • 热议话题
    • 游戏资讯
  • 红黑
    • 渗透分析
    • 攻防对抗
    • 代码发布
  • 自主研发
    • 知识库
    • 插件
      • ToolBox
      • HotSpot AI 热点创作
    • 区块
    • 快乐屋
    • 卡密
  • 乱步
    • 文章榜单
    • 热门标签
  • 问答中心反馈