HTML+CSS_html/css_WEB-ITnose
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了HTML+CSS_html/css_WEB-ITnose,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含11989字,纯文字阅读大概需要18分钟。
内容图文
![HTML+CSS_html/css_WEB-ITnose](/upload/InfoBanner/zyjiaocheng/401/8eae81b1247844e999b16177e699c815.jpg)
一、HTML标签:
1、加粗标签
2、倾斜标签
3、单独样式
4、引号
5、
长文本引用
6、地址信息
7、
8、
多行代码
9、
- 从5开始编号
10、
12、a标签的target="_blank":在新的页面打开
13、a标签的title="鼠标滑过显示文本"
14、
15、文本标签:</p> <p> 16、stry:样式标签 </p> <p> 17、Email标签:</p> <p> </p> <p> </p> <p> 18、下拉列表也可以进行多选操作,在<select>标签中设置multiple="multiple"属性,就可以实现多选功能,在 widows 操作系统下,进行多选时按下Ctrl键同时进行单击(在 Mac下使用 Command +单击),可以选择多个选项。</p> <p> </p> <p> 19、label标签不会向用户呈现任何特殊效果,它的作用是为鼠标用户改进了可用性。如果你在 label 标签内点击文本,就会触发此控件。就是说,当用户单击选中该label标签时,浏览器就会自动将焦点转到和标签相关的表单控件上(就自动选中和该label标签相关连的表单控件上)。</p> <p class="sycode"> <pre class="precsshui"></script></pre> </p> <p> 对于HTML中的常用标签就为大家总结到此,这些标签常用但不太容易记忆,本篇就是方便大家使用是查阅。下面我们一起温习一下CSS的基础知识吧。</p> <p> 二、CSS:</p> <p> 1、css的样式:内联式、嵌入式、外部式</p> <p> 2、css的选择器分为:A、标签选择器:body{}B、类选择器:.setGreen{}C、ID选择器:#setGreen{}D、通用选择器:*{}</p> <p> 3、文字排版:</p> <p> font-family:"宋体";</p> <p> font-weight:bold;粗体</p> <p> text-decoration:line-through;删除线</p> <p> text-decoration:underline;下划线</p> <p> text-indent:2em;缩进2个字节</p> <p> line-height:1.5em;行间距为1.5个字节</p> <p> letter-spacing:1.5em;字间距、字母间距</p> <p> 4、三种方法的优先级:内联式 > 嵌入式 > 外部式,但是嵌入式>外部式有一个前提:嵌入式css样式的位置一定在外部式的后面。如右代码编辑器就是这样,代码在<style type="text/css">...</style>代码的前面(实际开发中也是这么写的)。感兴趣的小伙伴可以试一下,把它们调换顺序,再看他们的优先级是否变化。其实总结来说,就是--就近原则(离被设置元素越近优先级别越高)。</p> <p> 5、伪类选择符:更有趣的是伪类选择符,为什么叫做伪类选择符,它允许给html不存在的标签(标签的某种状态)设置样式,比如说我们给html中一个标签元素的鼠标滑过的状态来设置字体颜色(a:hover{color:red;})。</p> <p> 6、分组选择符:当你想为html中多个标签元素设置同一个样式时,可以使用分组选择符(,),如下代码为右侧代码编辑器中的h1、span标签同时设置字体颜色为红色:h1,span{color:red;}它相当于下面两行代码:h1{color:red;}span{color:red;}</p> <p> 7、权值的规则:标签的权值为1,类选择符的权值为10,ID选择符的权值最高为100。例如下面的代码:</p> <p> p{color:red;} /*权值为1*/<br /> p span{color:green;} /*权值为1+1=2*/<br /> .warning{color:white;} /*权值为10*/<br /> p span.warning{color:purple;} /*权值为1+1+10=12*/<br /> #footer .note p{color:yellow;} /*权值为100+10+1=111*/<br /> 注意:还有一个权值比较特殊--继承也有权值但很低,有的文献提出它只有0.1,所以可以理解为继承的权值最低。</p> <p> 8、元素分类:在讲解CSS布局之前,我们需要提前知道一些知识,在CSS中,html中的标签元素大体被分为三种不同的类型:块状元素、内联元素(又叫行内元素)和内联块状元素。</p> <p> 常用的块状元素有:</p> <p> <div>、<p>、<h2>...<h6>、<ol>、<ul>、<dl>、<table>、、<blockquote> 、<form></p> <p> 常用的内联元素有:</p> <p> 、<span>、<br>、<i>、<em>、<strong>、<label>、<q>、<var>、<cite>、<code></p> <p> 常用的内联块状元素有:</p> <p> <img>、<input></p> <p> 9、在html中<div>、 <p>、<h2>、<form>、<ul> 和 <li>就是块级元素。内联元素设置display:block就是将元素显示为块级元素。</p> <p> 10、在html中,<span>、、<label>、<input>、 <img>、 <strong> 和<em>就是典型的内联元素(行内元素)(inline)元素。当然块状元素也可以通过代码display:inline将元素设置为内联元素。</p> <p> 11、内联块状元素(inline-block)就是同时具备内联元素、块状元素的特点,代码display:inline-block就是将元素设置为内联块状元素。(css2.1新增),<img>、<input>标签就是这种内联块状标签。</p> <p> 好了对于HTML和CSS的基础知识总结已经为大家分享完毕,希望对大家的学习有一点的帮助。<a href="http://www.laitingfm.com" /><img src="http://www.gxlcms.com/ad/link.jpg" /></a> <a href="https://curl.qcloud.com/kfoLTs9R" /><img src="http://www.gxlcms.com/ad/1040x100.jpg" /></a> <font color="red">本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈<a href="http://www.gxlcms.com/?s=gb-show-p-1.html">版权投诉</a></font> </article> </div> <div class="w310 r"> <a href="https://www.gxlcms.com/server-467421.html" target="_blank"> <img src="http://www.gxlcms.com/Public/aiod/ts.jpg" /></a> <div class="book"> <a href="http://www.gxlcms.com/special/html/" target="_blank" title="html代码教程/参考手册"> <img src="https://img.gxlcms.com/" alt="html代码教程/参考手册" /> <h3>html代码教程/参考手册</h3> </a> </div> <div class="youclmt"> <h3>html代码热搜</h3> </div> <div class="langmubt"> <ul> <li><a href="/htmldaima-351559.html" target="_blank">HTMLcellpadding与cellspacing属性图文详解</a></li><li><a href="/htmldaima-351555.html" target="_blank">详解HTML编程的标记与文档结构</a></li><li><a href="/htmldaima-351550.html" target="_blank">用DIV遮罩解决鼠标直接勾选checkbox无效的问题</a></li><li><a href="/htmldaima-351547.html" target="_blank">在网页上调用桌面exe程序的简单方法</a></li><li><a href="/htmldaima-351545.html" target="_blank">html借助marquee实现文字左右滚动</a></li><li><a href="/htmldaima-351540.html" target="_blank">关于分割线hr在各浏览器中的差异</a></li><li><a href="/htmldaima-351537.html" target="_blank">a标签的target链接指向iframe的方法</a></li><li><a href="/htmldaima-351533.html" target="_blank">使用overflow:hidden来禁用页面滚动条</a></li><li><a href="/htmldaima-351531.html" target="_blank">使用SWFObject完美解决HTML插入Flash的各浏览器兼容性方案</a></li><li><a href="/htmldaima-351530.html" target="_blank">如何使用图片按钮作为重置(reset)表单按钮</a></li><li><a href="/htmldaima-351528.html" target="_blank">超链接的宽度和高度直接设置不起作用的解决方法</a></li><li><a href="/htmldaima-351525.html" target="_blank">textarea的disabled与readonly属性具体用法介绍</a></li><li><a href="/htmldaima-351521.html" target="_blank">空格在Html中如何表示( 有什么含义)</a></li><li><a href="/htmldaima-351515.html" target="_blank">在js或css后加?v=版本号不让浏览器缓存</a></li><li><a href="/htmldaima-351514.html" target="_blank">块级元素和内联元素及可变元素汇总</a></li><li><a href="/htmldaima-351513.html" target="_blank">HTML的结束标签问题与w3c标准</a></li><li><a href="/htmldaima-351512.html" target="_blank">iframe框架在IE浏览器下将白色背景设为透明色</a></li><li><a href="/htmldaima-351511.html" target="_blank">AdobeBrackets简单使用图文教程</a></li><li><a href="/htmldaima-351505.html" target="_blank">如何去除表单的回车即提交即回车!=提交</a></li><li><a href="/htmldaima-351495.html" target="_blank">Readonly和Disabled之间的微小区别详解</a></li><li><a href="/htmldaima-351494.html" target="_blank">如何设置select只读不可编辑且select的值可传递</a></li><li><a href="/htmldaima-351489.html" target="_blank">html中radio值的获取、赋值、注册事件示例详解</a></li><li><a href="/htmldaima-351482.html" target="_blank">textarea标签大小不可变不能通过鼠标拖动的方式来拖动</a></li><li><a href="/htmldaima-351481.html" target="_blank">HTML中select标签单选多选用法详解</a></li><li><a href="/htmldaima-351469.html" target="_blank">disabled不可输入的值无法传递到action层</a></li> </ul> </div> <a href="https://curl.qcloud.com/I8w1gZa8" target="_blank"> <img src="http://www.gxlcms.com/ad/tx500x500.jpg" /></a> </div> </div> </div> </div> <script type="text/javascript" src="/layui/layui.js"></script> <script> layui.use('code', function() { layui.code({ elem: 'pre', //默认值为.layui-code about: false, skin: 'notepad', title: 'HTML+CSS_html/css_WEB-ITnose代码块', encode: true //是否转义html标签。默认不开启 }); }); </script> <link rel="stylesheet" type="text/css" href="/kan/css/basezb.css"> <script type="text/javascript" src="/kan/js/read.js"></script> <div style="display:none"> <div class="login-box" id="login-dialog"> <div class="login-top"><a class="current" rel="nofollow" id="login1" onclick="setTab('login',1,2);" >登录</a></div> <div class="login-form" id="nav-signin"> <!-- <div class="login-ico"><a rel="nofollow" class="qq" id="qqlogin" target="_blank" href="/?s=user-center-qqlogin.html"> QQ </a></div> --> <div class="login-box-form" id="con_login_1"> <form id="loginform" action="/?s=user-center-login.html" method="post" onsubmit="return false;"> <p class="int-text"> <input class="email" id="username" name="username" type="text" value="用户名或Email" onfocus="if(this.value=='用户名或Email'){this.value='';}" onblur="if(this.value==''){this.value='用户名或Email';};" ></p> <p class="int-text"> <input class="password1" type="password" id="password" name="password" value="******" onBlur="if(this.value=='') this.value='******';" onFocus="if(this.value=='******') this.value='';" > </p> <p class="int-info"> <label class="ui-label"> </label> <label for="agreement" class="ui-label-checkbox"> <input type="checkbox" value="" name="cookietime" id="cookietime" checked="checked" value="2592000"> <input type="hidden" name="notforward" id="notforward" value="1"> <input type="hidden" name="dosubmit" id="dosubmit" value="1">记住我的登录 </label> <a rel="nofollow" class="aright" href="/?s=user-center-forgetpwd.html" target="_blank"> 忘记密码? </a></p> <p class="int-btn"><a rel="nofollow" id="loginbt" class="loginbtn"><span>登录</span></a></p> </form> </div> <form id="regform" action="/?s=user-center-reg.html" method="post"> <div class="login-reg" style="display: none;" id="con_login_2"> <input type="hidden" name="t" id="t"/> <p class="int-text"> <input id="email" name="email" type="text" value="Email" onfocus="if(this.value=='Email'){this.value='';}" onblur="if(this.value==''){this.value='Email';};"></p> <p class="int-text"> <input id="uname" name="username" type="text" value="用户名或昵称" onfocus="if(this.value=='用户名或昵称'){this.value='';}" onblur="if(this.value==''){this.value='用户名或昵称';};"></p> <p class="int-text"> <input type="password" id="pwd" name="password" value="******" onBlur="if(this.value=='') this.value='******';" onFocus="if(this.value=='******') this.value='';"> </p> <p class="int-text1"><span class="inputbox"> <input id="validate" name="validate" type="text" value="验证码" onfocus="if(this.value=='验证码'){this.value='';}" onblur="if(this.value==''){this.value='验证码';};"> </span><span class="yzm-img"><img src="/?s=user-checkcode-index" alt="看不清楚换一张" id="indexlogin"></p> <p class="int-info"> <label> <input value="" name="agreement" id="agreement" CHECKED="checked" type="checkbox"> 我已阅读<a rel="nofollow" href="/?s=user-center-agreement.html">用户协议</a>及<a rel="nofollow" href="/?s=user-center-agreement.html">版权声明</a></label> </p> <p class="int-btn"><input type="hidden" name="dosubmit"/> <a rel="nofollow" class="loginbtn" id="register"><span>注册</span></a></p> </div> </form> </div> </div> </div> </div> <script type="text/javascript" src="/kan/js/foot_js.js"></script> <div id="footer"> <div class="w1200"> <p class="tips_text">本站所有资源全部来源于网络,若本站发布的内容侵害到您的隐私或者利益,请联系我们删除! <a href="/?s=gb-show-p-1.html" title="合作方式" target="_blank">合作方式</a></p> <p class="tips_text">Copyright © 2004-2018 https://www.gxlcms.com/. All Rights Reserved.<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?afb4873a3fbaa95f710a04306bfb4a0b"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <a href="http://beian.miit.gov.cn/" target="_blank">豫ICP备19030742号</a></p> </div> </div> <link rel="stylesheet" href="/Public/del/css/list.css"> </body> </html>
内容总结
以上是互联网集市为您收集整理的HTML+CSS_html/css_WEB-ITnose全部内容,希望文章能够帮你解决HTML+CSS_html/css_WEB-ITnose所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。