Blogger Information
Blog 42
fans 3
comment 2
visits 40770
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
jquery 设置属性/自定义属性/元素/样式等
虞者自愚的博客
Original
1807 people have browsed it

代码

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>桃谷绘里香作品</title>
    <style type="text/css">
        .box {width:100%;height:330px;background-color:#f3f3f3;margin:20px auto;}
        .jieshao {width:1100px;height:310px;background-color:#eaeaea;margin:auto;padding-top:10px;overflow:hidden;}
        /* .box .jieshao img {float:left;padding:0 20px 0 10px;} */
        .box .jieshao img:hover {opacity:0.8;}
        .name {font-size:2em;font-family:微软雅黑;display:block;padding-top:15px;}
        .box .jieshao p {font-size:0.9em;font-family:微软雅黑;line-height:1.6em;}
        /* .box .jieshao table {width:670px;font-family:微软雅黑;}
        .box .jieshao table tr {height:25px;}
        .box .jieshao table th {color:#a9a9a9;} */
        button {width:300px;height:40px;background-color:#408fdd;border:none;color:#fff;font-size:14px;margin-top:20px;border-radius:2%;}
        button:hover{background-color:#ff7200;font-size:16px;}
       /*  .zuopin {width:1180px;margin:20px auto;}
        .zuopin li {float:left;padding:10px;list-style-type:none;} */
        /* .zuopin li img {width:200px;} */
    </style>
</head>
<body>
<div class="box">
<div class="jieshao">
    <img src="http://gif-jpg.com/upload/big/2017/12/25/5a41031a3b33c.jpg" alt=""  title="" id="tg" data-fenlei="最美">
    <span id="name">桃谷绘里香 <small>个人资料</small></span>
    <p>桃谷绘里香,又名:桃谷エリカ,来自东京都,是日本女演员,所属事务所ロータス東京,2013年底在MVG上用なな艺名,靠着一部网路配信下载的作品疯传网络。仅短短一个月时间就成为年度素人排名第6名,超越整年度素人AV的销售,创下史上最快销售纪录话题,获得MGS排行榜第一。</p>
    <table>
    <tr>
    <th>别名:</th>
    <td>桃谷エリカ (ももたにえりか / Momotani Erika)、なな</td>
    </tr>
        <tr>
            <th>生日:</th>
            <td>1994年06月15日</td>
            <th>出道:</th>
            <td>2013年11月24日</td>
        </tr>
        <tr>
            <th>三围:</th>
            <td>T165 / B84 (C) / W56 / H82 / S<i>T身高(罩杯)</td>
            <th>特点:</th>
            <td>最美,著名,90后</td>
        </tr>
    </table>
    <button >在线观看桃谷绘里香所有作品</button>
</div></div>
<div class="zuopin">
    <ul>
        <li><img src="https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/timg.gif" alt="" id="img1"/></li>
        <li><img src="https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/timg.gif" alt="" id="img2"/></li>
        <li><img src="https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/timg.gif" alt="" id="img3"/></li>
        <li><img src="https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/timg.gif" alt="" id="img4"/></li>
        <li><img src="https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/timg.gif" alt="" id="img5"/></li>
        <li><img src="https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/timg.gif" alt="" id="img6"/></li>
        <li><img src="https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/timg.gif" alt="" id="img7"/></li>
        <li><img src="https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/timg.gif" alt="" id="img8"/></li>
        <li><img src="https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/timg.gif" alt="" id="img9"/></li>
        <li><img src="https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/timg.gif" alt="" id="img10"/></li>

    </ul>
</div>

</body>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript">
//替换图片列表
$('#img1').attr('src','https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/1.jpg')
$('#img2').attr('src','https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/2.jpg')
$('#img3').attr('src','https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/3.jpg')
$('#img4').attr('src','https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/4.jpg')
$('#img5').attr('src','https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/5.jpg')
$('#img6').attr('src','https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/6.jpg')
$('#img7').attr('src','https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/7.jpg')
$('#img8').attr('src','https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/8.jpg')
$('#img9').attr('src','https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/9.jpg')
$('#img10').attr('src','https://html-1255417912.cos.ap-guangzhou.myqcloud.com/xuexi/408/10.jpg')
//增加标题样式
$('#name').addClass('name')
$('#tg').attr('art','桃谷绘里香')
$('#tg').attr('title','我最喜欢的女优-桃谷绘里香')
$('#tg').attr('data-fenlei','最美90后')

$('.zuopin').css('width',1180).css('margin','20px auto')
$('.zuopin li').css('float','left').css('padding','10px').css('list-style-type','none')
//添加图片样式
$('.box .jieshao img').css('width',220).css('float','left').css('padding','0 20px 0 10px')
// $('.box .jieshao img:hover').css('opacity','0.8') //肿么不能用?(ˉ(∞)ˉ)
$('table').css('width',670).css('font-family','微软雅黑')
$('th').css('color','#a9a9a9')
$('tr').css('heigh',25)
$('.zuopin li img').css('width',200)


// console.log(res)
</script>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

手写

IMG_20180408_105239.jpg

Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post