diff --git a/demo/pc/card.html b/demo/pc/card.html index 7e87145..925d50a 100644 --- a/demo/pc/card.html +++ b/demo/pc/card.html @@ -218,5 +218,51 @@ + + + +
+ 用户主页名片 +
+
+
+
+
+ +
+
+
+
+ 奥宏科技 +
+
+ +
+
+
+
ID
+
2369
+
+
+
性别
+
+
+
+
工作时间
+
3年
+
+
+
地址
+
山东省临沂市兰山区
+
+
+
+ +
+
\ No newline at end of file diff --git a/demo/tpl.html b/demo/tpl.html index f3fc771..cbcf2e7 100644 --- a/demo/tpl.html +++ b/demo/tpl.html @@ -1,6 +1,6 @@
- 字段集区块 - 横线风格 -
- 内容区域 -
+ 字段集区块 - 横线风格 +
+ 内容区域 +
\ No newline at end of file diff --git a/source/scss/card/_index.scss b/source/scss/card/_index.scss index 3943206..a5e0089 100644 --- a/source/scss/card/_index.scss +++ b/source/scss/card/_index.scss @@ -1,2 +1,3 @@ @import './ul-card-simple-icon'; -@import './ul-card-message'; \ No newline at end of file +@import './ul-card-message'; +@import './ul-info-card'; \ No newline at end of file diff --git a/source/scss/card/_ul-info-card.scss b/source/scss/card/_ul-info-card.scss new file mode 100644 index 0000000..be21b77 --- /dev/null +++ b/source/scss/card/_ul-info-card.scss @@ -0,0 +1,48 @@ +.ul-info-card { + + background-color: #fff; + + .header { + .img { + width : 100%; + height : 160px; + background-size : cover; + background-position: center; + } + } + + .body { + margin-top: 15px; + + .title { + text-align : center; + font-size : 18px; + font-weight: 600; + color : #333; + } + + .line { + height : 3px; + width : 60px; + background-color: #1E9FFF; + margin : 10px auto; + } + + .info { + padding: 15px; + + .info-item { + display : inline-block; + min-width : 30%; + margin-bottom: 10px; + margin-right : 1%; + + .info-title { + font-size : 12px; + color : #999; + margin-bottom: 6px; + } + } + } + } +} \ No newline at end of file diff --git a/view/index/index/index.html b/view/index/index/index.html index afbb67a..e901431 100644 --- a/view/index/index/index.html +++ b/view/index/index/index.html @@ -129,7 +129,10 @@ $('.main-content h2,.main-content>.demo-page>fieldset').each(function (index, elem) { if ($(elem).find('.demo-js-src').length == 0) { - $(elem).children('.layui-field-box').addClass('demo-js-src').css('display', 'block'); + $(elem).children('.layui-field-box') + .addClass('demo-js-src') + .css('display', 'block') + .data('title', $(elem).children('legend').text()); } }) $('.main-content h2,.main-content>.demo-page>fieldset>legend').each(function (index, elem) { @@ -191,7 +194,8 @@ }); var contentCode = htmlListNew.join("\n"); if ($(this).siblings('pre.demo-js').length == 0) { - $('
').insertAfter(this);
+                var title = $(this).data('title');
+                $('
').insertAfter(this);
             }
             $(this).siblings('pre.demo-js').text(contentCode)
         })