使用CSS 客户化 SharePoint 2013 中的 promoted links 样式

本文讲述如何使用CSS客户化客户化 SharePoint 2013 中的 promoted links 样式。

promoted links 是SharePoint 中提供的一个图片链接的展示的 App,原始效果 如下:

     当鼠标 hover 到某个标题(Training sytem)上时:

    

但是实际开发 过程中总会对布局和样式做一些客户 化,比如 将四个链接 分为 两行 显示,第一图片个宽 100px, 第二个宽 200px,第三个图片宽200px,第四个图片 宽 100px, 标题部分的 背景色 改为紫色 :

下面分享做到以上 效果的 CSS代码

            div.ms-promlink-body {
               height: 200px;
                width: 400px;
            }

            div.ms-tileview-tile-root:nth-of-type(3) {
                height: 150px !important;
                width: 200px !important;
                 margin:10px;
            }

              div.ms-tileview-tile-root:nth-of-type(3) div.ms-tileview-tile-content,  div.ms-tileview-tile-root:nth-of-type(3) img
                {
                      height: 150px !important;
                      width: 200px !important;
                      left:0px;
                      right:0px;
                }

                div.ms-tileview-tile-root:nth-of-type(3) div.ms-tileview-tile-detailsBox
                {
                    width: 200px !important;
                }  

            div.ms-tileview-tile-root:nth-of-type(1) {
                height: 150px !important;
                width: 100px !important;
                margin:10px;
            }

                div.ms-tileview-tile-root:nth-of-type(1) div.ms-tileview-tile-content,  div.ms-tileview-tile-root:nth-of-type(1) img
                {
                      height: 150px !important;
                      width: 100px !important;
                      left:0px;
                      right:0px;
                }

                 div.ms-tileview-tile-root:nth-of-type(1) div.ms-tileview-tile-detailsBox
                {
                     width: 100px !important;
                }


            div.ms-tileview-tile-root:nth-of-type(2) {
                height: 150px !important;
                width: 200px !important;
                margin:10px;
            }

             div.ms-tileview-tile-root:nth-of-type(2) div.ms-tileview-tile-content,  div.ms-tileview-tile-root:nth-of-type(2) img
                {
                      height: 150px !important;
                      width: 200px !important;
                      left:0px;  
                      right:0px;
                }

                 div.ms-tileview-tile-root:nth-of-type(2) div.ms-tileview-tile-detailsBox
                {
                    width: 200px !important;
                }


            div.ms-tileview-tile-root:nth-of-type(4) {
                height: 150px !important;
                width: 100px !important;
                 margin:10px;
            }

              div.ms-tileview-tile-root:nth-of-type(4) div.ms-tileview-tile-content,  div.ms-tileview-tile-root:nth-of-type(4) img
                {
                      height: 150px !important;
                      width: 100px !important;
                      left:0px;
                      right:0px;
                }

               div.ms-tileview-tile-root:nth-of-type(4) div.ms-tileview-tile-detailsBox
                {
                     width: 100px !important;
                }

.ms-tileview-tile-detailsBox
{
    background-color:#7a44a2;
    font-weight:600;
    font-size:16px;
}
           


 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值