css屬性編寫順序+mysql基本操做+html細節(我的筆記)

css屬性編寫順序:php

  1. 影響文檔流的屬性(好比:display, position, float, clear, visibility, table-layout等)
  2. 自身盒模型的屬性(好比:width, height, margin, padding, border等)
  3. 排版相關屬性(好比:font, line-height, text-align, text-indent, vertical-align等等)
  4. 裝飾性屬性(好比:color, background, opacity, cursor等)
  5. 生成內容的屬性(好比:content, list-style, quotes等)

 

mysql基本操做(例子):css

  1. create table:CREATE TABLE recipes(ingredient VARCHAR(32), quantity VARCHAR(32), mtype VARCHAR(32), address VARCHAR(64));
  2. insert into:INSERT INTO tbl_name (col1,col2) VALUES(15,col1*2); 
  3. //增長一個新列html

    alter table t2 add d timestamp;
    alter table infos add ex tinyint not null default ‘0′;mysql

    //刪除列sql

    alter table t2 drop column c;fetch

    //重命名列ui

    alter table t1 change a b integer;htm

    //改變列的類型ip

    alter table t1 change b b bigint not null;
    alter table infos change list list tinyint not null default '0';utf-8

    //重命名錶

       alter table t1 rename t2;

 mysqli基本使用(例子):

<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");

/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

$query = "SELECT Name, CountryCode FROM City ORDER by ID DESC LIMIT 50,5";

if ($result = $mysqli->query($query)) {

    /* fetch object array */
    while ($row = $result->fetch_row()) {
        printf ("%s (%s)\n", $row[0], $row[1]);
    }

    /* free result set */
    $result->close();
}

/* close connection */
$mysqli->close();
?>

html細節:

  1. valign屬性用於td標籤
  2. body背景顏色bgcolor
  3. 屬性值儘可能用樣式來取代
  4. 使用frameset的頁面不能含有body標籤,基本例子以下:

    <html>
    <head>
    <title>新聞查看與管理</title>
    </head>

    <frameset rows="20%,*">
    <frame name="part1" src="part1.php"/>
    <frameset cols="25%,*">
    <frame name="part2" src="part2.php"/>
    <frame name="part3" src="part3.php"/>
    </frameset>
    </frameset>

    </html>

  5. 設定頁面使用的字符集。
    用法:<meta http-equiv="content-Type" content="text/html; charset=utf-8">
相關文章
相關標籤/搜索