久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

Discuz! 官方交流社區

標題: 請教圖片效果問題:做如東方財富網首頁頂部圖片效果 [打印本頁]

作者: oliver    時間: 2021-7-1 11:40
標題: 請教圖片效果問題:做如東方財富網首頁頂部圖片效果
請教一個圖片效果問題:做如東方財富網首頁頂部圖片效果和彈出可收縮廣告圖   ( https://www.eastmoney.com )
已找到樣式代碼但不知道放在論壇那個文件上可以做出這樣效果,請教各位大俠

<style type="text/css">
        .baokuang{height:800px;width:100%;background:url(//g1.dfcfw.com/g4/202106/20210623175012.png) repeat-x 0 0 #FFF;}
        .baokuang .bkImg,.baokuang .bkImg .cImgDiv {background:url(//g1.dfcfw.com/g4/202106/20210623182133.png) no-repeat center top;}
        .baokuang .bkImg {width:100%; height:800px;margin:0 auto;}
        .baokuang .bkImg .cImgDiv{width:1000px; height:40px; margin:0 auto; position:relative;}
        .baokuang .bkImg .clickMap { display:block; height:40px; width:100%; text-indent:-100em; overflow:hidden;}
        .baokuang .bkImg .close{background:url(//g1.dfcfw.com/g4/202106/20210623120249.png) no-repeat;width:44px; height:18px;cursor:pointer; position:absolute; right:0px; bottom:20px; text-indent:-100em; overflow:hidden;}
        .pageCont { background:#FFF; height:0; overflow:hidden; margin-top:-760px;}
        .top-advert{margin-top:0; padding-top: 0;}
        .emfloat_wrapper{margin-top:30px;}
        </style>
    </head>

<body>
        <div id="baokuangBox" class="baokuang">
            <div class="bkImg">
                <div class="cImgDiv">
                        <a class="clickMap" >&nbsp;</a>
                    <span class="close">關閉</span>
                </div>
            </div>
        </div>
        <div id="pageCont" class="pageCont"></div>

作者: oliver    時間: 2021-7-1 14:41
如首頁頂部這個圖片不知放在論壇什么文件上
作者: 鴻茂傳媒    時間: 2021-7-1 15:42
一般放在頭部
作者: oliver    時間: 2021-7-1 20:03
試過放在header.htm文件中,但沒效果
作者: allthebest    時間: 2021-7-2 02:09
oliver 發表于 2021-7-1 11:03
試過放在header.htm文件中,但沒效果

你的沒效果是什么意思?
作者: allthebest    時間: 2021-7-2 05:05
東方財富網首頁頂部圖片

(, 下載次數: 6)

作者: oliver    時間: 2021-7-2 12:51
把以下代復制到header.htm文件中,在論壇首頁沒顯示圖片
注:圖片和路徑已改為自己網地址
<style type="text/css">
        .baokuang{height:800px;width:100%;background:url(//g1.dfcfw.com/g4/202106/20210623175012.png) repeat-x 0 0 #FFF;}
        .baokuang .bkImg,.baokuang .bkImg .cImgDiv {background:url(//g1.dfcfw.com/g4/202106/20210623182133.png) no-repeat center top;}
        .baokuang .bkImg {width:100%; height:800px;margin:0 auto;}
        .baokuang .bkImg .cImgDiv{width:1000px; height:40px; margin:0 auto; position:relative;}
        .baokuang .bkImg .clickMap { display:block; height:40px; width:100%; text-indent:-100em; overflow:hidden;}
        .baokuang .bkImg .close{background:url(//g1.dfcfw.com/g4/202106/20210623120249.png) no-repeat;width:44px; height:18px;cursor:pointer; position:absolute; right:0px; bottom:20px; text-indent:-100em; overflow:hidden;}
        .pageCont { background:#FFF; height:0; overflow:hidden; margin-top:-760px;}
        .top-advert{margin-top:0; padding-top: 0;}
        .emfloat_wrapper{margin-top:30px;}
        </style>
作者: allthebest    時間: 2021-7-2 17:40
東方財富網首頁頂部圖片先下載到本地;將圖片傳到服務器對應的目錄里,覆蓋,更新緩存即可
作者: oliver    時間: 2021-7-2 20:10
是這樣做的,但圖片不顯示,沒效果
作者: allthebest    時間: 2021-7-2 21:22
oliver 發表于 2021-7-2 11:10
是這樣做的,但圖片不顯示,沒效果

圖片只支持窄版;若用第三方模版,背景圖片要放到第三方模版的同樣位置。
作者: oliver    時間: 2021-7-3 21:07
我把圖片放在根目錄下的/ad/文件夾,模版是自己根據網上教程建立的簡單模版,就是仿不到那種圖片效果,上面那段代碼不知要放在那個文件上
作者: oliver    時間: 2021-7-4 15:28
已經解決問題,多謝鴻茂傳媒和allthebest解答
把圖片上傳到相應文件夾,在header.htm  <head></head>部分添加以下代碼:

<style>body { background-image:url(背景圖片地址,如); background-repeat:no-repeat; background-position: top center; padding-top:40px;}</style>

之前我照抄別人網站那段代碼是不成的




歡迎光臨 Discuz! 官方交流社區 (http://www.9999xn.com/) Powered by Discuz! W1.0