Blogger Information
Blog 5
fans 0
comment 1
visits 3038
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP与HTML的关系,制作表格-2018.8.14
圈圈小竹子的博客
Original
648 people have browsed it
  1. 学习PHP为什么必须要掌握HTML?

    答:前端HTML代码,由浏览器负责解释并执行;

    后端代码,例如php,由服务器上的特殊程序来运行

  2. 为什么选择PHP开发动态网站?

    答:快,上手快,开发快,更新快,迭代快



  3. 实例

    <style type="text/css">
    	table {		
    		border-collapse: collapse; /*折叠表格线*/
    		width: 700px;
    		text-align: center;
    		margin: 20px auto;
    	}
    	table caption {
    		font-size: 2rem;
    		font-weight: bolder;
    		color: #666;
    		margin-bottom: 20px;
    	}
    	table, th, td {
    		border: 1px solid #666;
    		
    	}
    	
    
    	table tr:first-child {
    		background-color: lightgreen;
    	}
    
    	table tr:hover {
    		background-color: #efefef;
    		color: coral;
    	}
    
    	table tr td img {
    		padding: 5px;
    		border-radius: 10px;
    	}
    
    	table tr td a {
    		text-decoration: none;
    		width:140px;
    		height:40px;
    		padding:5px;
    		border:1px solid black;
    		background: white;
    		color:black;
    		border-radius: 8px;
    	}
    
    	table tr td a:hover {
    		background: black;
    		color:white;
    	}
    
    </style>
    
    <table>
    	<caption>购物车</caption>
    	<tr>
    		<th>序列</th>
    		<th>名称</th>
    		<th>品类</th>
    		<th>数量</th>
    		<th>约略图</th>
    		<th>BUY</th>
    	</tr>
    	<tr>
    		<td>1</td>
    		<td>手机</td>
    		<td>三星</td>
    		<td>1台</td>
    		<td><img src="images/phone.jpg" width="100"></td>
    		<td><a href="http://taobao.com">点击BUY</a></td>
    	</tr>
    	<tr>
    		<td>2</td>
    		<td>电视</td>
    		<td>小米</td>
    		<td>1台</td>
    		<td><img src="images/tv.jpg" width="100"></td>
    		<td><a href="http://taobao.com">点击BUY</a></td>
    	</tr>
    	<tr>
    		<td>3</td>
    		<td>电脑</td>
    		<td>戴尔</td>
    		<td>1台</td>
    		<td><img src="images/pc.jpg" width="100"></td>
    		<td><a href="http://taobao.com">点击BUY</a></td>
    	</tr>
    </table>

    运行实例 »

    点击 "运行实例" 按钮查看在线实例

总结:

前端HTML代码,由浏览器负责解释并执行;

后端代码,例如php,由服务器上的特殊程序来运行

php优势:快,上手快,开发快,更新快,迭代快


Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments