html5怎么实现当购物车里面有条消息时在右上角有个数字

html5怎么实现当购物车里面有条消息时在右上角有个数字,第1张

<style type="text/css">

sup{

background: red

color: white

border-radius: 5px/*圆角*/

padding: 0px 3px/*左右边距*/

top: -1em/*数字离图片右上角的高度*/

}

#shop{

margin-top:10px

}

</style>

<div id="shop">

<img src="images/1.jpg"/ width="25" height="25">

<sup>1</sup>

</div>

<TABLE border=0 cellSpacing=0 cellPadding=0 width=230 height=230>

    <TBODY>

        <TR>

            <TD width=230>

                <P>

                    <MARQUEE onmouseover="this.stop()" onMouseOut="this.start()" height=230 behavior=alternate width=730 

scrollAmount=2>

                        <span style="display:inline-blockposition:relative"><img border=0 alt="" src="" width=230 height=230><B style="position:absoluteright:10pxtop:10px">文字居右上角</B></span>

                        <span style="display:inline-blockposition:relative"><img border=0 alt="" src="" width=230 height=230><B style="position:absoluteright:10pxtop:10px">文字居右上角</B></span>

                        <span style="display:inline-blockposition:relative"><img border=0 alt="" src="" width=230 height=230><B style="position:absoluteright:10pxtop:10px">文字居右上角</B></span>

                        <span style="display:inline-blockposition:relative"><img border=0 alt="" src="" width=230 height=230><B style="position:absoluteright:10pxtop:10px">文字居右上角</B></span>

                        <span style="display:inline-blockposition:relative"><img border=0 alt="" src="" width=230 height=230><B style="position:absoluteright:10pxtop:10px">文字居右上角</B></span>

                        <span style="display:inline-blockposition:relative"><img border=0 alt="" src="" width=230 height=230><B style="position:absoluteright:10pxtop:10px">文字居右上角</B></span>

                        <span style="display:inline-blockposition:relative"><img border=0 alt="" src="" width=230 height=230><B style="position:absoluteright:10pxtop:10px">文字居右上角</B></span>

                        <span style="display:inline-blockposition:relative"><img border=0 alt="" src="" width=230 height=230><B style="position:absoluteright:10pxtop:10px">文字居右上角</B></span>

                    </MARQUEE>

                </P>

            </TD>

        </TR>

    </TBODY>

</TABLE>

sup标签

<div>颜色和背<sup>sup</sup>景色会根据窗口大小变化,不信你缩小浏览器窗口试试!</div>


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/7086792.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-01
下一篇 2023-04-01

发表评论

登录后才能评论

评论列表(0条)

保存