前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >专栏 >7b2美化-首页添加导航会员区块

7b2美化-首页添加导航会员区块

作者头像
小狐狸说事
发布于 2022-11-17 07:47:08
发布于 2022-11-17 07:47:08
79605
代码可运行
举报
文章被收录于专栏:小狐狸说事小狐狸说事
运行总次数:5
代码可运行

7b2美化-首页添加导航会员区块


右侧vip可以自动识别是否开通会员,附件放到网站根目录

以下代码放入后台-模块管理-自定义

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<!-- 区块代码 开始 -->
<div id="home-row-qukuai" class="  home_row home_row_1  module-qukuai  " style="background-color:;">
   <div class="wrapper">
        <div class="home-row-left content-area ">
            <div class="sort b2-radius" style="margin-top:0px ;">
                <ul class="sort-config">
                    <li>
                                            <div class="sort-config-item">
                                            <img class="sort-config-icon" src="/img/2022040407423076.svg" alt="" />
                                            <a href="https://www.xiaohuli.vip/" target="_blank"><p class="sort-config-title">区块高度
                                            <span class="go" style="background-color: #ff6000;">GO<i class="b2font b2-arrow-right-s-line"></i></span>
                                            </p> </a>
                                            <span class="sort-config-desc">后台可设置定位高度</span>
                                            </div></li> <li>
                                            <div class="sort-config-item">
                                            <img class="sort-config-icon" src="/img/2022040407423033.svg" alt="" />
                                            <a href="https://www.xiaohuli.vip/" target="_blank"><p class="sort-config-title">区块颜色
                                            <span class="go" style="background-color: #5de000;">GO<i class="b2font b2-arrow-right-s-line"></i></span>
                                            </p> </a>
                                            <span class="sort-config-desc">本区块设置负数例如-60px</span>
                                            </div></li> <li>
                                            <div class="sort-config-item">
                                            <img class="sort-config-icon" src="/img/2022040407422988.svg" alt="" />
                                            <a href="https://www.xiaohuli.vip/" target="_blank"><p class="sort-config-title">下方广告
                                            <span class="go" style="background-color: #ff6000;">GO<i class="b2font b2-arrow-right-s-line"></i></span>
                                            </p> </a>
                                            <span class="sort-config-desc">组和VIP组可以单独关闭</span>
                                            </div></li> <li>
                                            <div class="sort-config-item">
                                            <img class="sort-config-icon" src="/img/2022040407422990.svg" alt="" />
                                            <a href="https://www.xiaohuli.vip/" target="_blank"><p class="sort-config-title">角标可设置
                                            <span class="go" style="background-color: #ff6000;">GO<i class="b2font b2-arrow-right-s-line"></i></span>
                                            </p> </a>
                                            <span class="sort-config-desc">角标颜色也可以设置哦</span>
                                            </div></li> <li>
                                            <div class="sort-config-item">
                                            <img class="sort-config-icon" src="/img/2022040407422937.svg" alt="" />
                                            <a href="https://www.xiaohuli.vip/" target="_blank"><p class="sort-config-title">无忧售后
                                            <span class="go" style="background-color: #ff6000;">GO<i class="b2font b2-arrow-right-s-line"></i></span>
                                            </p> </a>
                                            <span class="sort-config-desc">保证放心购、安心用</span>
                                            </div></li>                 </ul>
                                            <div class="sort-blocks">
                    <div class="bt-body">
                        <div class="containerrr">
                            <div class="onecad-quk-carousel">
                                <div class="itemss">
                                    <a class="card_ZQsT- b2-radius" href="https://www.xiaohuli.vip/" target="_blank">
                                                                        <img src="/img/1646645863-a756b411d8cfd69.jpg">
                                                                        <div class="title_3qCGt">后台可添加</div>
                                                                        <div class="tipss jiaobiao_color6">广告</div>
                                                                    </a><a class="card_ZQsT- b2-radius" href="https://www.xiaohuli.vip/" target="_blank">
                                                                        <img src="/img/1628154884-a96bf386ea68fd1.png">
                                                                        <div class="title_3qCGt">角标可选择</div>
                                                                        <div class="tipss jiaobiao_color6">广告</div>
                                                                    </a><a class="card_ZQsT- b2-radius" href="https://www.xiaohuli.vip/" target="_blank">
                                                                        <img src="/img/1648712370-d59a15461c78f74.jpeg">
                                                                        <div class="title_3qCGt">组定位高度后台可调整</div>
                                                                        <div class="tipss jiaobiao_color4">推荐</div>
                                                                    </a><a class="card_ZQsT- b2-radius" href="https://www.xiaohuli.vip/" target="_blank">
                                                                        <img src="/img/1647488870-6fa6b58b4b1b751.jpg">
                                                                        <div class="title_3qCGt">本组后台可关闭</div>
                                                                        <div class="tipss jiaobiao_color3">热门</div>
                                                                    </a><a class="card_ZQsT- b2-radius" href="https://www.xiaohuli.vip/" target="_blank">
                                                                        <img src="/img/1634631547-a03889872f26e97.jpg">
                                                                        <div class="title_3qCGt">可独立显示上栏</div>
                                                                        <div class="tipss jiaobiao_color3">热门</div>
                                                                    </a>                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="srot-mine b2-radius">
                        <i class="srot-mine-bg"></i>
                        <div class="sort-mine-wrap">
                            <div class="srot-mine-tit">
                                <img src="https://img.onecad.cn/wp-content/uploads/2022/01/20220114064641724.svg" alt="" class="srot-mine-ava" />
                                <span>开通会员全站素材无限制下载</span>
                            </div>

                    <div id="userDisplayName" class="srot-mine-vips">
                    <!-- 永久会员 -->
                    <a href="./vips" target="_blank" class="sort-vips-item"> <img class="sort-vips-icon" src="//s.ibaotu.com/next/img/new/person.b254.png" alt=""> <p class="sort-vips-tit">永久会员</p> <p class="sort-vips-tit2"><span class="sort-vips-tit2-kt" v-if="userData && userData.lv.vip.lv == 'vip3'">已开通</span><span class="sort-vips-tit2-wk" v-else>未开通</span></p> </a>
                    <!-- 一年会员 -->
                    <a href="./vips" target="_blank" class="sort-vips-item"> <img class="sort-vips-icon" src="//s.ibaotu.com/next/img/new/ep.4814.png" alt=""> <p class="sort-vips-tit">年卡会员</p> <p class="sort-vips-tit2"><span class="sort-vips-tit2-kt"  v-if="userData && userData.lv.vip.lv == 'vip2'">已开通</span><span class="sort-vips-tit2-wk" v-else>未开通</span></p> </a>
                    <!-- 月费会员 -->
                    <a href="./vips" target="_blank" class="sort-vips-item"> <img class="sort-vips-icon" src="//s.ibaotu.com/next/img/new/create.503f.png" alt=""> <p class="sort-vips-tit">月卡会员</p> <p class="sort-vips-tit2"><span class="sort-vips-tit2-kt"  v-if="userData && userData.lv.vip.lv == 'vip1'">已开通</span><span class="sort-vips-tit2-wk" v-else>未开通</span></p> </a>
                    <!-- 体验会员 -->
                    <a href="./vips" target="_blank" class="sort-vips-item index-bjq-a"><img class="sort-vips-icon" src="//s.ibaotu.com/next/img/new/design.16dc.png" alt=""><p class="sort-vips-tit index-bjq-txt">体验会员</p><p class="sort-vips-tit2"><span class="sort-vips-tit2-kt"  v-if="userData && userData.lv.vip.lv == 'vip0'">已开通</span><span class="sort-vips-tit2-wk" v-else>未开通</span></p></a>
                    </div>                        </div>
                    </div>
                </div>
                            </div>
        </div>
    </div>
</div>
<!-- 区块代码结束 -->

以下代码放入css样式

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
/*区块*/
.sort {
    position: relative;
    z-index: 3;
    padding: 26px;
    background: #fff;
    /* border: 1px solid #797c80; */
    /* -webkit-box-shadow: 0 40px 75px 0 rgba(57,60,67,.08); */
    /* box-shadow: 0 40px 75px 0 rgba(57,60,67,.08); */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.sort-config {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}
.main {
    width: 1410px;
    margin: 0 auto;
    padding-bottom: 40px;
}
.sort-config>li {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow: hidden;
    height: 100%;
}
.ibanner-tips-float {
    position: absolute;
    top: -70px;
    left: 1096px;
    z-index: 24;
}
.sort-config-item {
    display: block;
    height: 100%;
}
.sort-config-item img {
    float: left;
    width: 62px;
    height: 62px;
    margin-right: 12px;
}
.sort-config-title {
    line-height: 34px;
    font-size: 18px;
    font-weight: 600;
    color: #2d2d2d;
    -webkit-transition: .3s;
    transition: .3s;
}
.sort-config-desc {
    float: left;
    line-height: 22px;
    font-size: 14px;
    color: #8e8e8e;
}
.sort-blocks {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    height: 100%;
    margin-top: 35px;
}
.sort-blocks-item {
    position: relative;
    overflow: hidden;
    width: 214px;
    height: 100%;
    background: #f7f9fa;
    border-radius: 14px;
}
.sort-blocks-item .blocks-item-wrap {
    -webkit-transition: .3s;
    transition: .3s;
    -webkit-filter: none;
    filter: none;
}
.sort-blocks-icon {
    display: block;
    width: 60px;
    height: 47px;
    margin: 18px auto 15px;
    background-repeat: no-repeat;
    background-size: cover;
}
.sort-blocks-title {
    line-height: 22px;
    font-size: 22px;
    font-weight: 600;
    color: #2d2d2d;
    letter-spacing: 1px;
    text-align: center;
}
.sort-mine-wrap img {
    display: flex;
    width: auto;
}
.sort-config-title .go {
    border-radius: 4px;
    color: #ffffff;
    font-size: 13px;
    -webkit-transform: scale(.9);
    -ms-transform: scale(.9);
    transform: scale(.9);
    font-weight: normal;
    padding: 2px 5px;
    position: absolute;
    line-height: 15px;
    margin-left: 5px;
    cursor: pointer;
    text-transform: uppercase;
    vertical-align: middle;
    margin-top: 7px;
}
.sort-blocks-item .blocks-hover, .sort-blocks-item .blocks-hover-title {
    position: absolute;
    top: 0;
    width: 100%;
    color: #fff;
    text-align: center;
    line-height: 22px;
}
.sort-blocks-item .blocks-hover {
    left: 0;
    height: 100%;
    padding-top: 22px;
    font-size: 14px;
    background: rgba(0,0,0,.4);
    -webkit-transition: .3s;
    transition: .3s;
    opacity: 0;
}
.sort-blocks-item .blocks-hover-tit {
    line-height: 18px;
    font-size: 18px;
}
.sort-blocks-item .blocks-hover-line {
    width: 158px;
    height: 1px;
    margin: 12px auto 8px;
    background: -webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),color-stop(30%,hsla(0,0%,100%,.7)),color-stop(70%,hsla(0,0%,100%,.7)),to(hsla(0,0%,100%,.1)));
    background: linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.7) 30%,hsla(0,0%,100%,.7) 70%,hsla(0,0%,100%,.1));
}
.srot-mine {
    position: relative;
    width: 376px;
    background: -webkit-gradient(linear,left top,right top,from(#fdf8eb),to(#feeec3));
    background: linear-gradient(90deg,#fdf8eb,#feeec3);
    height: 180px;
    box-shadow: 0 2px 5px 0 rgb(0 0 0 / 4%);
}
.srot-mine-bg {
    position: absolute;
    top: 13px;
    right: -13px;
    width: 118px;
    height: 78px;
    background: url(./img/sort_zuanshi.png) no-repeat;
    background-size: cover;
}
.sort-mine-wrap {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 12px 16px 15px;
}
.srot-mine-tit {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    line-height: 25px;
}
.srot-mine-ava {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}
.srot-mine-tit>span {
    margin-left: 9px;
    font-size: 15px;
    font-weight: 600;
    color: #613c14;
}
.srot-mine-vips {
    display: flex;
    -webkit-box-pack: justify;
    justify-content: space-between;
    width: 337px;
    margin: 15px 0px 5px;
}
.sort-vips-item {
    display: block;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    text-align: center;
}
.sort-vips-icon {
    display: block;
    width: 32px;
    height: 36px;
    margin: 0 auto;
    -webkit-transition: .3s;
    transition: .3s;
    margin-left: 30px;
}
.sort-vips-tit {
    margin: 15px 0px;
    line-height: 12px;
    font-size: 13px;
    color: #613c14;
    margin-left: 10px;
}
.sort-vips-tit2-kt {
    margin-top: 10px;
    line-height: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 25px;
    color: #ffffff;
    border-radius: 33px;
    margin-right: 10px;
    font-size: 14px;
    background-image: linear-gradient(90deg,#ffc046,#ff7d04);
    margin: 10px 0px 0px 9px;
}
.sort-vips-tit2-wk {
    margin-top: 10px;
    line-height: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 25px;
    color: #ffffff;
    border-radius: 33px;
    margin-right: 10px;
    font-size: 14px;
    opacity: 0.5;
    background: linear-gradient(to bottom, #323232 0%, #3F3F3F 40%, #1C1C1C 150%), linear-gradient(to top, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.25) 200%); background-blend-mode: multiply;
    margin: 10px 0px 0px 9px;
}
.bt-body {
    padding-bottom: 0px;
    background: transparent;
    width: calc(100% - 376px);
}
.b-boxs .video .s-pic{height: 189px;}
.b-boxs .video .video-view {height: 186px;width: 337px; overflow: hidden; cursor: pointer;display: block;}
.b-boxs .video:hover .video-view .img-none{display: none;}
.b-boxs .video .video-view video{width: 337px;}
.b-boxs .video:hover .video-view video{display: block;}
.b-boxs .video .mark{height: 189px; display: none;}
.b-boxs .video:hover .mark{display: none;}
.b-boxs .video .v-down{
    position: absolute;
    top: 12px;
    left: 57%;
    z-index: 2;
    margin-left: 65px;
    padding-left: 21px;
    width: 45px;
    height: 31px;
    border-radius: 2px;
    background: url(./img/video.png) -8px -77px no-repeat #007aff;
    color: #fff;
    font-size: 20px;
    font-size: 14px;
    line-height: 31px;
    opacity: 0;
    cursor: pointer;
    -moz-opacity: 0;
    -khtml-opacity: 0;
}
.b-boxs .video .v-down:hover {
    background: url() -5px -77px no-repeat #6e91e6;
}
.b-boxs .video .v-collect{
    width: 31px;
    height: 31px;
    line-height: 31px;
    position: absolute;
    left: 58%;
    top: 12px;
    margin-left: 23px;
    color: #333;
    font-size: 20px;
    border-radius: 2px;
    z-index: 2;
    background: url(./img/video.png) -11px 5px no-repeat #fff;
    padding-left: 0px;
    cursor: pointer;
    filter: alpha(opacity=0);
    ilter: alpha(opacity=0);
    -moz-opacity: 0;
    -khtml-opacity: 0;
    opacity: 0;
    font-size: 17px;
    letter-spacing: 7px;
}
.b-boxs .video:hover .v-collect,.b-boxs .video:hover .v-down{
    filter: alpha(opacity=1);
    ilter: alpha(opacity=1);
    -moz-opacity: 1;
    -khtml-opacity: 1;
    opacity: 1;
}
.b-boxs .video .chosed{
    background: url(./img/video.png) -11px -36px no-repeat #fff;
}
.b-boxs .video .title {
    position: absolute;
    bottom: 0px;
    left: 0px;
    width: 316px;
    height: 30px;
    line-height: 30px;
    color: #ffffff;
    text-align: left;
    z-index: 1;
    overflow: hidden;
    white-space: nowrap;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    font-size: 12px;
    background: #00000075;
    background-color: #1677ff00;
    background-image: linear-gradient(-90deg, #00000000, #000000);
}
.b-box .audio-box {
    width: 340px;
    height: 160px;
    float: left;
    margin-right: 16px;
    margin-bottom: 16px;
    margin-top: 0px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0px 9px rgba(0,0,0,.1);
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 10px;
}
.b-boxs .video:hover  .video-bq,.b-boxs .video:hover .title{
    display: none;
}
.b-boxs .video:hover .mc-bottom{
    display:none;
}
.b-boxs .video .mc-bottom{
    display: inline-block;
    position: absolute;
    width: 100%;
    height: 32%;
    left: 0;
    bottom: 0;
    background: #000;
    opacity: .4 \9 \0;
    background: -moz-linear-gradient(bottom, rgba(0, 0, 0, .4) 0, transparent 100%);
    background: -webkit-gradient(linear, bottom, top, color-stop(0, rgba(0, 0, 0, .4)), color-stop(100%, transparent));
    background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, .4) 0, transparent 100%);
    background: -o-linear-gradient(bottom, rgba(0, 0, 0, .4) 0, transparent 100%);
    background: -ms-linear-gradient(bottom, rgba(0, 0, 0, .4) 0, transparent 100%);
    background: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, .4)), to(transparent));
    background: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgba(0, 0, 0, .4)), to(transparent));
    background: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgba(0, 0, 0, .4)), to(transparent));
    background: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgba(0, 0, 0, .4)), to(transparent));
    background: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgba(0, 0, 0, .4)), to(transparent));
    background: linear-gradient(to top, rgba(0, 0, 0, .4) 0, transparent 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#000000, endColorstr=#ffffff);
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient (GradientType=0, startColorstr=#000000, endColorstr=#ffffff)";
}
.good-ppt {
    width: 100%;
}
.topic-title {
    height: 41px;
    color: #484747;
    text-align: left;
}
.wlimits {
    margin-right: -59px;
}
.topic-title .jptitle {
    display: inline-block;
    width: 280px;
    color: #000;
    letter-spacing: 2px;
    font-size: 24px;
}
.topic-title .jptitle .shiping {
    display: inline-block;
    width: 87px;
    height: 63px;
    background: url(../image/tb.png) 0px -345px no-repeat;
    vertical-align: -23px;
}
.topic-title ul {
    display: inline-block;
    float: right;
}
.topic-title ul li {
    display: inline-block;
}
.topic-title ul li a {
    display: inline-block;
    margin-right: 6px;
    padding: 0 10px;
    height: 35px;
    /* border: 1px solid #e5e5e5; */
    /* background: #fff; */
    color: #606060;
    font-size: 14px;
    line-height: 35px;
}
.topic-title ul li em {
    display: inline-block;
    height: 14px;
    width: 1px;
    background: #b7b7b7;
    vertical-align: -2px;
}
.b-boxs {
    margin-right: -16px;
    overflow: hidden;
}
.b-boxs .s-box {
    width: 337px;
    height: auto;
    float: left;
    margin-right: 19px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 9px rgba(0,0,0,.1);
    background: #ffffff;
}
.b-boxs .s-box .s-pic {
    width: 100%;
    height: 407px;
}
.lazy {
    display: block;
    width: 100%;
    height: 100%;
}
@media screen and (max-width: 768px){
.flickity-enabled.is-draggable {
    margin-top: 0px;
}
}
.b2-menu-4 .sub-menu-0 li ul a:hover {
    font-weight: 500;
    border-radius: 3px;
    color: #ff416c;
}
.b2-menu-4 .sub-menu-0 li ul a {
    font-size: 16px;
    font-weight: 400;
    color: #333333;
    padding: 8px 0;
    display: flex;
    align-items: center;
    margin-top: 0px;
}
.containerrr { margin: 0px auto;width:100%; }
@media screen and (max-width: 1366px) {
.containerrr {
    margin: 0px auto;
    width: 830px;
}
.srot-mine {
    width: 355px;
}
}
.containerrr .itemss a {
    display: inline-block;
    margin-right: 16px;
    width: calc(20% - 16px);
    height: 180px;
    text-align: center;
}
.card_ZQsT- {
    height: 192px;
    width: 128px;
    display: inline-block;
    vertical-align: top;
    cursor: pointer;
    white-space: normal;
    box-shadow: 0 2px 5px 0 rgb(0 0 0 / 4%);
    background: #FFFFFF;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    padding: 0px 0 16px 0;
    margin-right: 16px;
    text-decoration: none;
    transition: all 0.3s;
}
.card_ZQsT-:hover {
    display: inline-block;
    vertical-align: top;
    cursor: pointer;
    white-space: normal;
    box-shadow: 0 2px 5px 0 rgb(0 0 0 / 4%);
    background: #FFFFFF;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    padding: 0px 0 16px 0;
    margin-right: 16px;
    text-decoration: none;
    transform: translateY(-3px);
}
.card_img{
    display: block;
    height: 180px;
}
.card_ZQsT- .title_3qCGt {
    font-size: 14px;
    color: #222222;
    height: 35px;
    background-color: #fff;
    line-height: 35px;
    width: 100%;
    position: absolute;
    display: block;
    margin-top: -35px;
}
.card_ZQsT- img{
    height: 180px;
    width: 100%;
}
.card_ZQsT- .year-tag_3Iqeg {
    height: 19px;
    min-width: 52px;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    position: absolute;
    top: 6px;
    left: 6px;
    text-align: center;
    line-height: 19px;
    font-size: 12px;
    color: #FFFFFF;
    box-sizing: border-box;
    padding: 0 8px;
    border-radius: 10px;
}
.huodong{background:#0693e3}
.remen{background:#fcb900}
.jingping{background:#cf2e2e}
.guanggao{background:#00d084}
.tuijain{background:#ff6900}
.yuliu{background:#0693e3}
.onecad-quk-carousel .itemss {
	white-space: nowrap;
	width: 100%;
	display: flex;
	-webkit-overflow-scrolling: touch;
    -webkit-box-pack: justify;
    -moz-box-pack: justify;
    justify-content: space-between;
}
.onecad-quk-carousel .itemss::-webkit-scrollbar {
	display: none;
}

以下代码放入child.js

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
var qukuai = new Vue({
	el:'.sort-mine-wrap',
	data:{

	},
	computed:{
        userData(){
            return this.$store.state.userData;
        }
    }
})

本文来自:小狐狸资源网

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
工具分享:Excel制作的条形码生成器
这是用Excel制作的一个条形码生成器,仍然是在forum.ozgrid.com中找到的一个很好的示例。
fanjy
2024/02/29
3090
工具分享:Excel制作的条形码生成器
VBA专题01:操作形状的VBA代码
Excel提供了多种多样的形状类型,如下图1所示。本文主要讲述VBA操作形状的基础操作。
fanjy
2019/07/19
6K0
谈谈使用VBA控制PPT
然而,与Excel不同的是,在PowerPoint中没有宏录制器,因而不能将操作录制成代码。但我们可以借助于Excel的宏录制器,在Excel中录制相关操作的代码,然后稍作修改,将其移植到PowerPoint中。
fanjy
2023/08/30
7950
谈谈使用VBA控制PPT
VBA实用小程序50: 在指定的单元格中插入指定的形状
下面的自定义函数使用Shapes集合对象的AddShape方法及其参数,可以在指定的单元格中插入指定的形状。
fanjy
2019/07/19
2.6K0
VBA实用小程序50: 在指定的单元格中插入指定的形状
VBA专题09:基本的Excel图表编程代码
图表是数据可视化的一种常用呈现方式,VBA代码可以帮助我们自动化创建图表及对图表进行相关的操作,特别是当工作表中有大量图表需要进行重复修改时,VBA十分有用。
fanjy
2020/02/18
5.1K0
VBA实战技巧03: 精确追踪工作表中我们关注的形状
有些Excel用户喜欢在工作表中绘制形状,以实现其目的。例如,如下图1所示,绘制一个矩形方框来强调这些单元格中的数据。
fanjy
2020/03/27
1K0
中秋节到用ExcelVBA画一个圆
https://docs.microsoft.com/zh-cn/office/vba/api/office.msoautoshapetype
哆哆Excel
2022/10/25
7510
中秋节到用ExcelVBA画一个圆
VBA实战技巧34:使用VBA组织图形1
引言:本文的代码整理自mrexcel.com,一个很好的令人兴奋的示例,有兴趣的朋友可以仔细研究。
fanjy
2021/09/22
1.7K0
庆国庆VBA画一红旗
Sub 画国旗(L, T, W, H) 'Dim s1 As Shape Dim oWK As Worksheet Set oWK = Excel.ActiveSheet '插入一个半径为25Point的圆 s1_L = L + (W / 30) * 5 s1_T = T + (H / 20) * 5 Set s0 = oWK.Shapes.AddShape(msoShapeRectangle, L, T, W, H)
哆哆Excel
2022/10/25
1.7K0
庆国庆VBA画一红旗
使用VBA复制、插入、移动、删除和控制图片1
最好将图像直接创建到对象变量中,然后可以使用变量来引用图像,而不需要知道图像的名称,如下面的代码所示。
fanjy
2023/08/29
1.3K0
使用VBA复制、插入、移动、删除和控制图片1
Excel批量插图小工具
问题描述:根据商品货号在Excel里进行图片展示 多文件批量插图 本程序下载地址:https://download.csdn.net/download/qq_35866846/12170343 有下载使用不清楚的可以后台留言 插入后效果图:
诡途
2022/05/09
6360
Excel批量插图小工具
VBA实战技巧35:使用VBA组织图形2
引言:本文的代码与昨天发表的《VBA实战技巧34:使用VBA组织图形1》一样,都整理自mrexcel.com,一个很好的令人兴奋的示例,有兴趣的朋友可以仔细研究。
fanjy
2021/09/22
1.8K0
VBA应用示例:根据工作表中的信息制作带图像的人员卡片(扩展版)
在《VBA应用示例:根据工作表中的信息制作带图像的人员卡片》中,我们使用一些代码,根据工作表中人员的图像、姓名、年龄等信息,自动制作相应的人员卡片。
fanjy
2024/06/04
1830
VBA应用示例:根据工作表中的信息制作带图像的人员卡片(扩展版)
使用VBA快速给所选择的多个单元格区域绘制矩形边框
首先,选取想要绘制边框的所有单元格区域,可以在选择单元格区域的同时按住Ctrl键,从而选取多个单元格区域。然后,运行下面的代码,VBA会自动给所选单元格区域的周边绘制红色的边框,效果如下图1所示。
fanjy
2023/08/30
7830
使用VBA快速给所选择的多个单元格区域绘制矩形边框
VBA实战技巧02: 判断是否是我们想要执行操作的对象
在有些VBA代码解决方案中,需要先确定所选择的对象,这样才能使用合适的代码来对其进行相应的操作。本文介绍的代码可用来确定所选对象。
fanjy
2020/02/18
9050
ChatGPT与Excel结合_编写VBA宏
⭐Excel VBA宏(Visual Basic for Applications)是一种用于在Microsoft Excel中自动化和扩展功能的编程语言。VBA允许用户编写自定义的脚本或宏,以便通过执行一系列指令来自动完成特定任务。
天天Lotay
2023/10/15
8270
ChatGPT与Excel结合_编写VBA宏
VBA小技巧15:引用形状
这是一位朋友碰到的应用场景:我们必须创建很多形状来显示每个形状所覆盖的单元格中的文本值,有时这些单元格和/或形状会移动。如果手动检查每个形状并将其重新链接到其各自的单元格引用,非常耗时。此时,VBA可以来帮助我们。
fanjy
2021/09/22
8230
PowerPoint VBA参考代码库2
fanjy
2023/08/30
5340
PowerPoint VBA参考代码库2
EXCEL VBA语句集300
        定制模块行为 (1) Option Explicit ‘强制对模块内所有变量进行声明 Option Private Module ‘标记模块为私有,仅对同一工程中其它模块有用,在宏对话框中不显示  Option Compare Text ‘字符串不区分大小写  Option Base 1 ‘指定数组的第一个下标为1 (2) On Error Resume Next ‘忽略错误继续执行VBA代码,避免出现错误消息 (3) On Error GoTo ErrorHandler ‘当错误发生时跳转到过程中的某个位置 (4) On Error GoTo 0 ‘恢复正常的错误提示 (5) Application.DisplayAlerts=False ‘在程序执行过程中使出现的警告框不显示 (6) Application.ScreenUpdating=False ‘关闭屏幕刷新 Application.ScreenUpdating=True ‘打开屏幕刷新 (7) Application.Enable.CancelKey=xlDisabled ‘禁用Ctrl+Break中止宏运行的功能  工作簿 (8) Workbooks.Add() ‘创建一个新的工作簿 (9) Workbooks(“book1.xls”).Activate ‘激活名为book1的工作簿 (10) ThisWorkbook.Save ‘保存工作簿 (11) ThisWorkbook.close ‘关闭当前工作簿 (12) ActiveWorkbook.Sheets.Count ‘获取活动工作薄中工作表数 (13) ActiveWorkbook.name ‘返回活动工作薄的名称 (14) ThisWorkbook.Name ‘返回当前工作簿名称 ThisWorkbook.FullName ‘返回当前工作簿路径和名称 (15) ActiveWindow.EnableResize=False ‘禁止调整活动工作簿的大小 (16) Application.Window.Arrange xlArrangeStyleTiled ‘将工作簿以平铺方式排列 (17) ActiveWorkbook.WindowState=xlMaximized ‘将当前工作簿最大化  工作表 (18) ActiveSheet.UsedRange.Rows.Count ‘当前工作表中已使用的行数 (19) Rows.Count ‘获取工作表的行数(注:考虑向前兼容性) (20) Sheets(Sheet1).Name= “Sum” ‘将Sheet1命名为Sum (21) ThisWorkbook.Sheets.Add Before:=Worksheets(1) ‘添加一个新工作表在第一工作表前 (22) ActiveSheet.Move After:=ActiveWorkbook. _ Sheets(ActiveWorkbook.Sheets.Count) ‘将当前工作表移至工作表的最后 (23) Worksheets(Array(“sheet1”,”sheet2”)).Select ‘同时选择工作表1和工作表2 (24) Sheets(“sheet1”).Delete或 Sheets(1).Delete ‘删除工作表1 (25) ActiveWorkbook.Sheets(i).Name ‘获取工作表i的名称 (26) ActiveWindow.DisplayGridlines=Not ActiveWindow.DisplayGridlines ‘切换工作表中的网格线显示,这种方法也可以用在其它方面进行相互切换,即相当于开关按钮 (27) ActiveWindow.DisplayHeadings=Not ActiveWindow.DisplayHeadings ‘切换工作表中的行列边框显示 (28) ActiveSheet.UsedRange.FormatConditions.Delete ‘删除当前工作表中所有的条件格式 (29) Cells.Hyperlinks.Delete ‘取消当前工作表所有超链接 (30) ActiveSheet.PageSetup.Orientation=xlLandscape 或ActiveSheet.PageSetup.Orientation=2 ‘将页面设置更改为横向 (31) ActiveSheet.PageSetup.RightFooter=ActiveWorkbook.FullName ‘在页面设置的表尾中输入文件路径 ActiveSheet.PageSetup.Le
Tony老师
2020/03/05
2.2K0
使用VBA在PowerPoint中创建倒计时器(续)附示例PPT下载
其中,Now()引用当前日期和时间,将其存储在变量time中,然后加上30秒,因此将time称为未来时间。
fanjy
2023/08/30
2.2K0
使用VBA在PowerPoint中创建倒计时器(续)附示例PPT下载
推荐阅读
相关推荐
工具分享:Excel制作的条形码生成器
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
本文部分代码块支持一键运行,欢迎体验
本文部分代码块支持一键运行,欢迎体验