这是目标效果。
我偷了样式文件,偷了图片,一模一样的源代码测试,结果如下,泪奔。
提示框的页面源码如下:
<table class="MessageBox" align="center" width="500"> <tr class="head"> <td class="left"></td> <td class="center"> <div class="title">提示</div> </td> <td class="right"></td> </tr> <tr class="msg"> <td class="left"></td> <td class="center info"> <div class="msg-content">请选择用户,只能查询您管理范围内的,角色序号在您之后的用户</div> </td> <td class="right"></td> </tr> <tr class="foot"> <td class="left"></td> <td class="center"></td> <td class="right"></td> </tr></table>
相关的样式如下:
/* 提示框样式 */.MessageBox{}/* 表头 */.MessageBox .head{ height:32px; overflow:hidden;}.MessageBox .head .left{ width:20px; background:url('images/message_bg.png') left 0px no-repeat;}.MessageBox .head .center{ padding:0px; background:url('images/message_bg.png') 0px -32px repeat-x;}.MessageBox .head .center .title{ float:left; color:#fff; font-size:16px; font-weight:bold; margin-top:5px;}.MessageBox .head .right{ width:20px; background:url('images/message_bg.png') right 0px no-repeat;}/* 表头 */.MessageBox .head-no-title{ height:16px;}.MessageBox .head-no-title .left{ width:20px; background:url('images/message_bg.png') left -96px no-repeat;}.MessageBox .head-no-title .center{ background:url('images/message_bg.png') 0px -112px repeat-x;}.MessageBox .head-no-title .right{ width:20px; background:url('images/message_bg.png') right -96px no-repeat;}/* 按钮栏 */.MessageBox .control{ height:40px; vertical-align:top;}.MessageBox .control .left{ width:20px; background:url('images/message_center_bg.png') left top repeat-y;}.MessageBox .control .center{ background-color:#7bafe6; text-align:center;}.MessageBox .control .right{ width:20px; background:url('images/message_center_bg.png') right top repeat-y;}/* 表底 */.MessageBox .foot{ height:16px;}.MessageBox .foot .left{ width:20px; background:url('images/message_bg.png') left -64px no-repeat;}.MessageBox .foot .center{ background:url('images/message_bg.png') 0px -80px repeat-x;}.MessageBox .foot .right{ width:20px; background:url('images/message_bg.png') right -64px no-repeat;}/* 提示框 */.MessageBox .msg{ height:90px;}.MessageBox .msg .left{ width:20px; background:url('images/message_center_bg.png') left top repeat-y;}.MessageBox .msg .center{ padding-left:90px; font-size:16px; background-color:#7bafe6;}.MessageBox .msg .center .msg-content{ color:#fff; margin:20px 12px 20px 6px;}.MessageBox .msg .right{ width:20px; background:url('images/message_center_bg.png') right top repeat-y;}.MessageBox .msg .error{ background-image:url("images/icon64_error.png"); background-position:0px 10px; background-repeat:no-repeat;}.MessageBox .msg .info{ background-image:url("images/icon64_info.png"); background-position:0px 10px; background-repeat:no-repeat;}.MessageBox .msg .warning{ background-image:url("images/icon64_warning.png"); background-position:0px 10px; background-repeat:no-repeat;}.MessageBox .msg .forbidden{ background-image:url("images/icon64_forbidden.png"); background-position:0px 10px; background-repeat:no-repeat;}.MessageBox .msg .stop{ background-image:url("images/icon64_stop.png"); background-position:0px 10px; background-repeat:no-repeat;}.MessageBox .msg .blank{ height:40px; padding:10px 20px 10px 20px; text-align:center;}
需要用到的图片如下:
这是message_bg.png
这是message_center_bg.png
求大神帮我~明天就要开会演示了,我是.NET开发人员,对样式实在是外行。。
似乎这跟HTML标准有关,现在项目里母版页统一的是:
nbsp;html>
谢谢各位~
回复讨论(解决方案)
你调试看看是哪个background-position有偏差了,后面是xy坐标,改一下把白条给去掉
要是演示用,就用一张图片好了,搞这么多拼接干嘛,要显示很多种方式类型吗
设置table的 cellspaceing cellpadding 为0
可能拼错了
将表格的边框、边距、间距都设置为0,即:

HTML的未来将朝着更加语义化、功能化和模块化的方向发展。1)语义化将使标签更明确地描述内容,提升SEO和无障碍访问。2)功能化将引入新元素和属性,满足用户需求。3)模块化将支持组件化开发,提高代码复用性。

htmlattributesarecrucialinwebdevelopment forcontrollingBehavior,外观和功能

alt属性是HTML中标签的重要部分,用于提供图片的替代文本。1.当图片无法加载时,alt属性中的文本会显示,提升用户体验。2.屏幕阅读器使用alt属性帮助视障用户理解图片内容。3.搜索引擎索引alt属性中的文本,提高网页的SEO排名。

HTML、CSS和JavaScript在网页开发中的作用分别是:1.HTML用于构建网页结构;2.CSS用于美化网页外观;3.JavaScript用于实现动态交互。通过标签、样式和脚本,这三者共同构筑了现代网页的核心功能。

设置标签的lang属性是优化网页可访问性和SEO的关键步骤。1)在标签中设置lang属性,如。2)在多语言内容中,为不同语言部分设置lang属性,如。3)使用符合ISO639-1标准的语言代码,如"en"、"fr"、"zh"等。正确设置lang属性可以提高网页的可访问性和搜索引擎排名。

htmlattributeseresene forenhancingwebelements'functionalityandAppearance.TheyAdDinformationTodeFineBehavior,外观和互动,使网站互动,响应式,visalalyAppealing.AttributesLikutesLikeSlikEslikesrc,href,href,href,类,类型,类型,和dissabledtransfransformformformformformformformformformformformformformformforment

toCreateAlistinHtml,useforforunordedlistsandfororderedlists:1)forunorderedlists,wrapitemsinanduseforeachItem,RenderingeringAsabulleTedList.2)fororderedlists,useandfornumberedlists,useandfornumberedlists,casundfornumberedlists,customeizableWithTheTtheTthetTheTeTeptTributeFordTributeForderForderForderFerentNumberingSnumberingStyls。

HTML用于构建结构清晰的网站。1)使用标签如、、定义网站结构。2)示例展示了博客和电商网站的结构。3)避免常见错误如标签嵌套不正确。4)优化性能通过减少HTTP请求和使用语义化标签。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

安全考试浏览器
Safe Exam Browser是一个安全的浏览器环境,用于安全地进行在线考试。该软件将任何计算机变成一个安全的工作站。它控制对任何实用工具的访问,并防止学生使用未经授权的资源。

ZendStudio 13.5.1 Mac
功能强大的PHP集成开发环境

记事本++7.3.1
好用且免费的代码编辑器

VSCode Windows 64位 下载
微软推出的免费、功能强大的一款IDE编辑器

MinGW - 适用于 Windows 的极简 GNU
这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。