每日一练

来源:互联网 发布:c语言经典小游戏源代码 编辑:程序博客网 时间:2024/06/11 18:45
       
p{letter-spacing:5px;word-spacing:50px;text-transform:capitalize uppercase lowercase;font-variant:small-caps;//转换成大写的小字母white-space:nowrap;//强制在一行显示white-space:pre//换行和空白受保护text-decoration:line-through overline underline;text-indent: 1cm;font-style: italic;direction: rtl}td,table{border:1px solid blue;width: 100px;border-collapse: collapse;text-align: center;}body{background-attachment}ul li{list-style-type:decimal;margin-left:50px;border: 1px solid blue;list-style-position:outside; }div{width: 100px;height: 100px;background-color: red;float: left;margin-left: 10px;}<meta name="viewport" content="width=device-width,initial-scale=1.0">修正网页在大部分移动设备上的显示<meta name="keywords" content="关键字一,php,apache,mysql,linux"><!--[if lt IE 9]>   <script src="http://html5shim.googlecode.com.svn/trunk/html5.js"></script><![endif]--> html5文档有些新的标签,如果浏览器版本小于9,就不能识别这些标签,那么可以加载html5.js的脚本        <meta name="description" content="我们网站是做什么的,你可以在这里学到什么内容,也就是当前面的中心思想">        <meta name="robots" content="all">或none        <meta name="robots" content="index"或noindex>告诉搜索引擎是否允许将我的网页放入他的缓存数据库中,搜索引擎是将网页从他的缓存数据库中拿过来的        <meta name="robots" content="follow"或nofollow>是否允许搜索引擎通过我的网页爬别人的网页        <meta name="author" content="lampbrother,gaoluofeng">        <meta name="copyright" content="2001-2012 EDU.">        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">        <meta http-equiv="refresh" content="3000;url=http://www.baidu.com">        <meta http-equiv="expires" content="0">为0禁止浏览器使用缓存,或指定时间缓存到某时间                <Meta http-equiv="Expires" Content="Wed, 26 Feb 1997 08:21:57 GMT">必须使用GMT格式时间                <Meta http-equiv="Pragma" Content="No-cach">禁止浏览器从本地机的缓存中调阅页面内容。访问者将无法脱机浏览。            <meta http-equiv="Windows-Target" content="_top">        <base href="http://www.lampbrother.net">        <link rel="shortcut icon" type="image/x-icon" href="image/favicon.ico" />        <link rel="stylesheet" type="text/css" href="css/layout.css">    img{width: 500px;filter:Alpha(opacity:30);opacity: 0.3;}1    <!-- 设置网页图标-->2    <link rel="shortcut icon" href="/favicon.ico" >/favicon.ico: 为图片路径3    <!-- 设置地址栏图标-->4    <link rel="icon" type="image/gif" href="/animated_favicon1.gif" >/animated_favicon1.gif: 为图片路径CSS文件输入样式表,在一个样式表中导入其它样式表1)在a.css中 P{background-color:red;} @import url(b.css); @import url(c.css);<html>    <head>        <title>建立图像标签</title>    </head>        <body>2)<style> P{background-color:red;} @import url(b.css);</style>            <a href="#one">第一段</a><br>            <a href="#two">第二段</a><br>            <a href="#three">第三段</a><br>                    <a href="http://localhost/cms/index.php"><img src="logo.gif" border=0 width=50% alt="xsphp_logo"/></a><br><br>            <img src="logo.gif" usemap="#mymap" border=0 />            <map name="mymap">                <area shape="rect"  coords="5, 5, 50, 70" href="http://www.php.net" target="_blank">                <area shape="circle" coords="75, 35,30" href="http://www.apache.org" target="_blank">                <area shape="poly" coords="175,0,110,70, 180,70" href="http://www.linux.com"target="_blank">            </map>            </body>    </html>

*和+都会尽可能多的匹配符合的内容,而*?和+?都是尽可能少的匹配符合
用例子说吧,假设一个字符串为 "abc123",分别用不同的正则表达式获取匹配内容,如下:
\w+ 获取到 "abc"
\w+? 获取到 "a"
\w* 获取到 "abc"
\w*? 获取到 “”
\w*\d* 获取到 "abc123"
\w*\d*? 获取到 "abc"
\w*\d+ 获取到 "abc123"
\w*\d+? 获取到 "abc1"

0 0
原创粉丝点击