ASP代码里border=0啥意思?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ASP代码里border=0啥意思?相关的知识,希望对你有一定的参考价值。

<img src="图片地址" width=100 height=100 border=0></A>这一句代码里的border=0,我加不加好像都是一样的还有width=100 height=100 和width="100" height="100"多了对双引号,有什么用?有没有都是一样的吗?谢谢高手帮我回答

border=0是图片边框尺寸等于零,所以你加不加都是一样的,但是如果这里border=的值不是零,这个语句的作用就能显示出来了。一般编程中<img src="图片地址" width=100 height=100 border=0></A>都写这句border=0,就是为了程序块严谨,修改方便。width=100 height=100 和width="100" height="100"的区别:数字加不加引号的区别就是所定义的数据类型不同,数字不加引号是数字类型,加引号是字符串类型。希望能帮到您。 参考技术A 不加或者用了border=1,那么当鼠标移到图片上时就会出现一个蓝色的边框(这其实是a标签造成的);如果用了border=0,那么就不会出现边框。
不过如果在CSS中把IMG的border设为0,那么你在html代码中加不加border=0都是一样的。

width=100 height=100 和width="100" height="100"效果是一样的,但是后者更符合规范(XML规范规定节点的属性值要用双引号界定)。
参考技术B border为框宽度,为0时表示无边框。你可以将此文件存在本地电脑中,形如XX.htm的文件,然后双击打开就能看到效果。 参考技术C border=0是告诉这个图片没有边框。
对于里面的属性如 src,width,height,border等后面的值加不加双引号都可以正常显示,但为了符合标准建议加上双印号
参考技术D img标签下border的数值代表的是图片的边框大小!在你这行代码中间,是为了限定边框等于0,因为img如果嵌套在a标签里面的话就会多出一个边框!、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、至于引号的作用是区别标签的属性和值,在html这种不十分严谨的语法当中,有没有都无所谓。但是建议你加上去!理由:代码可读性;对seo的兼容性!【seo理论上读取的是引号里面的注释,比如alt,title等】

这段css代码大概是啥意思

.sideBar .menuBox li
font:14px 宋体;
height:30px;
line-height:25px;
border-top:1px white solid;


.sideBar .menuBox li a
display:block;
padding-left:35px;
background:transparent url('images/menu-bullet.png') no-repeat 20px center;
height:25px;


.sideBar .menuBox li a:hover
display:block;
color:#069;
background:white url('images/menu-bullet.png') no-repeat 20px center;

.sideBar .menuBox li                       <!-- li控件的样式 -->
font:14px 宋体;
height:30px;
line-height:25px;
border-top:1px white solid;


.sideBar .menuBox li a                      <!-- li控件中的a标签样式 -->
display:block;
padding-left:35px;
background:transparent url('images/menu-bullet.png') no-repeat 20px center;
height:25px;


.sideBar .menuBox li a:hover                <!-- 鼠标放在a标签上时,a标签的样式 -->
display:block;
color:#069;
background:white url('images/menu-bullet.png') no-repeat 20px center;

参考技术A .sideBar .menuBox li //cass为sideBar 里的menuBox里的 li 的样式
font:14px 宋体; 字体为大小14px 宋体
height:30px; //高度:30px
line-height:25px; //行高:25px
border-top:1px white solid; //上边框 1px 白色 单线

.sideBar .menuBox li a li里面的a标签的样式
display:block; //块区域 默认的
padding-left:35px; //左边的外边距为35px
background:transparent url('images/menu-bullet.png') no-repeat 20px center; //背景用图片代替
height:25px; //高度25px


.sideBar .menuBox li a:hover //a 标签鼠标移上去的效果
display:block; //默认
color:#069; //a 标签字体的颜色变成#069 的颜色
background:white url('images/menu-bullet.png') no-repeat 20px center; //背景用图片
本回答被提问者采纳

以上是关于ASP代码里border=0啥意思?的主要内容,如果未能解决你的问题,请参考以下文章

电脑atl是啥意思

asp.net中Server.MapPath是啥意思?

asp.net中的三层架构是啥意思

在asp.net中string username = reader.GetString(0).Trim();是啥意思

代码border="1"cellpadding="0"cellpadding="0"这段代码是啥意思啊?请教

[HttpPost] ASP.NET中有啥作用???