div+css - nowrap标记设置不自动折行

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

div+css - nowrap标记设置不自动折行

[IE的相关文档]

http://msdn.microsoft.com/en-us/library/ms534196(VS.85).aspx

[HTML3.2版本中有效]

http://www.w3.org/tr/rec-html32.html

[HTML4.0中反对使用]

http://www.w3.org/TR/1998/REC-html40-19980424/struct/tables.html#adef-nowrap

http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-62922045

 

 

[div+css - 关键词]

div css

[div+css - 工具]

InternetExplorer Developer Toolbar,http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en

The W3C Markup Validation Service:, http://validator.w3.org/

微软印刷技术 - 自由字体信息, TrueType, OpenType, ClearType:, http://www.microsoft.com/typography/default.mspx

微软印刷技术 - WEFT 3网页嵌入字体3, http://www.microsoft.com/typography/WEFT.mspx

 

微软印刷技术 - WEFT 3 - 网页嵌入字体3 - 下载, http://www.microsoft.com/typography/web/embedding/weft3/download.aspx

微软印刷技术 - WEFT 3 - 网页嵌入字体3 - 向导, http://www.microsoft.com/typography/web/embedding/weft3/wizard.aspx

 

微软印刷技术 - WEFT 3网页嵌入字体3 - Wizard向导 - Create font objects创建字体对象,http://www.microsoft.com/typography/web/embedding/weft3/wizard.aspx#create

微软印刷技术 - WEFT 3网页嵌入字体3 - Wizard向导 - Fonts to embed待嵌入字体,http://www.microsoft.com/typography/web/embedding/weft3/wizard.aspx#embed

[div+css - 常见问题]

较验div+css格式,http://validator.w3.org/
div+css的margin缩写方式
div+css的padding缩写方式
链接的:link,:visited,:hover,:active四种状态

div+css使用backgroundRepeat样式设置背景图片的显示方式, http://msdn2.microsoft.com/en-us/library/ms530721.aspx

page-break-before设置打印分布符

url()指示符, http://www.w3.org/TR/CSS21/syndata.html#value-def-uri

!important规则, http://www.w3.org/TR/CSS21/cascade.html#important-rules

table中直接输入的文字和其他标记设置不同的颜色

CSS标准中级联的文档, http://www.w3.org/TR/CSS21/cascade.html#cascade

 

 

 

 

[div+css - Firefox和IE浏览器兼容问题]

水平居中,Firefox使用margin-left: auto; margin-right: auto; IE6 使用text-align: center;
垂直居中,Firefox中使用display: table-cell; vertical-align: middle;可以实现div垂直居中,而IE6中则需要借助IE6中css的特点实现垂直居中。
!important标记,Firefox支持!important标记,IE6忽略!important标记,!important需要放在前面才能起作用
手形鼠标指针,使用cursor: pointer;
padding的尺寸,在Firefox中padding是计算在width之外的,而IE6是计算在width之内的
margin的尺寸,在IE6中带有float样式的元素的margin尺寸计算有误,需要借助padding和!important标记实现兼容

使用word-wrap设置自动折行, 仅对IE有效

<li style="overflow:hidden">在Firefox下会丢失左侧的圆点

Internet Explorer的CSS参考资料, http://msdn2.microsoft.com/en-us/library/ms531209.aspx

用CSS实现cellSpacing属性效果, border-spacing: 10px; border-spacing: expression(this.cellSpacing=10);

padding-right在IE6下导致抖动

 

 

 

[div+css - CSS标准]

 

Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification:级联样式表第2级第1次修改(CSS 2.1)规范, http://www.w3.org/TR/CSS21/

4.3.2 Lengths长度, http://www.w3.org/TR/CSS21/syndata.html#length-units

5.8.3 Class selectors - Class选择器 - CSS标准文档, http://www.w3.org/TR/CSS21/selector.html#class-html

class属性 - IE文档, http://msdn2.microsoft.com/en-us/library/ms533560.aspx

 

 

 

8.3Margin properties: 'margin-top', 'margin-right', 'margin-bottom','margin-left', and 'margin' - 8.3边距属性,http://www.w3.org/TR/CSS21/box.html#margin-properties

 

 

8.5 Border properties边框属性, http://www.w3.org/TR/CSS21/box.html#border-properties

 

9.5 Floats浮动, http://www.w3.org/TR/CSS21/visuren.html#floats

background-image背景图片, http://www.w3.org/TR/CSS21/colors.html#propdef-background-image

17.6.2 The collapsing border model压缩边框模型, http://www.w3.org/TR/CSS21/tables.html#collapsing-borders

 

border-collapse压缩边框 - IE文档, http://msdn2.microsoft.com/en-us/library/ms533513.aspx

display对象渲染方式, http://msdn2.microsoft.com/en-us/library/ms530751.aspx

 

 

 

 

[div+css - XHTML标准]

5.2.4. List Module列表模块, http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_listmodule

5.6. Table Modules - Table模块, http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#sec_5.6.

[div+css - 其他HTML问题]

使用OPTGROUP对SELECT中的OPTION分组

nowrap标记设置不自动折行, http://www.w3.org/TR/1998/REC-html40-19980424/struct/tables.html#adef-nowrap

leftmargin设置页面左边距, topmargin设置页面上边距

disabled属性, http://msdn2.microsoft.com/en-us/library/ms533732.aspx

 

About Font Embedding:关于字体嵌入, http://msdn2.microsoft.com/en-us/library/ms533034.aspx
Vector Markup Language (VML):, http://msdn2.microsoft.com/en-us/library/bb264280.aspx

Internet Explorer的HTML and DHTML参考, http://msdn2.microsoft.com/en-us/library/ms533050.aspx

 

           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
这里写图片描述
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要实现自适应长度的横向滚动公告,可以使用CSS3的flex布局和marquee标签。具体步骤如下: 1. 使用一个div元素作为容器,设置宽度为100%、高度为固定值,并且设置overflow属性为hidden,使内容超过div大时被隐藏。 2. 在div容器内部创建一个ul元素,并使用CSS3的flex布局,设置flex-wrap属性为nowrap,使ul元素内部的li元素无法换行。 3. 对ul元素设置white-space属性为nowrap,使ul元素内部的文本不换行。 4. 对li元素设置display:inline-block,使li元素能够在一行内显示。 5. 使用marquee标签来实现横向滚动的效果,并将marquee标签内部的内容设置为ul元素。 6. 通过CSS3的media query来实现不同屏幕尺寸下的适配。 下面是示例代码: HTML代码: ``` <div class="notice-container"> <marquee behavior="scroll" direction="left"> <ul class="notice-list"> <li>第一条公告信息</li> <li>第二条公告信息</li> <li>第三条公告信息</li> <li>第四条公告信息</li> <li>第五条公告信息</li> <li>第六条公告信息</li> <li>第七条公告信息</li> </ul> </marquee> </div> ``` CSS代码: ``` .notice-container { width: 100%; height: 50px; overflow: hidden; } .notice-list { display: flex; flex-wrap: nowrap; white-space: nowrap; } .notice-list > li { display: inline-block; } @media screen and (max-width: 768px) { .notice-list > li { font-size: 12px; } } @media screen and (min-width: 768px) and (max-width: 992px) { .notice-list > li { font-size: 14px; } } @media screen and (min-width: 992px) { .notice-list > li { font-size: 16px; } } ``` 通过上述步骤,就可以实现一个自适应长度的横向滚动公告了。可以根据需要调整容器的高度、文本的字体大小、marquee标签的滚动速度等参数来适应不同的场景。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值