<div id="MessageButton" style="background:lightblue;margin-top:50px; border-bottom:1px lightgray solid; width:100%;">
<h1 style="font-size:1em;text-align:center;">Active History</h1>
</div>
It is my Computer Notes. Using Guide : object-key or object-key-key e.g. Step 1 Blog Search : [mysql-run] and then Step 2 ctrl+F [mysql-run] {bookMark me : Ctrl+D}
2014年5月15日 星期四
2014年5月7日 星期三
css-example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title></title> | |
<style type="text/css" media="screen"> | |
div { | |
margin-bottom: 30px; | |
} | |
#divID #sitemap { | |
font-size: 140%; | |
font-weight: bold; | |
color: #f63; | |
} | |
#divID #sitemap li ul { | |
font-size: 90%; | |
color: #000; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="divID"> | |
<ul id="sitemap"> | |
<li>This is a test. </li> | |
<li> | |
<ul> | |
<li>This is a test. </li> | |
<li>This is a test. | |
<ul> | |
<li>Part I</li> | |
<li>Part II</li> | |
</ul> | |
</li> | |
<li>This is a test. </li> | |
</ul> | |
</li> | |
<li>This is a test. </li> | |
</ul> | |
</div> | |
</body> | |
</html> | |
2014年5月2日 星期五
td-same-width even overflow
.textEllipsis{
display:block;
text-overflow:ellipsis;
overflow: hidden;
white-space: nowrap;
}
display:block;
text-overflow:ellipsis;
overflow: hidden;
white-space: nowrap;
}
2014年4月3日 星期四
css-scroll css-scrollbar html-scroll html-overflow no scrol bar
No scroll bar
<body scroll="no" style="overflow: hidden"> <!--20140513-->
<body scroll="no" style="overflow: hidden"> <!--20140513-->
When you specify only a base color
body {
scrollbar-base-color: #ff0000;
}
scrollbar-base-color: #ff0000;
}
When you specify the detailed color
body {
scrollbar-face-color: #ff8c00;
scrollbar-track-color: #fff8dc;
scrollbar-arrow-color: #ffffff;
scrollbar-highlight-color: #fff8dc;
scrollbar-shadow-color: #d2691e;
scrollbar-3dlight-color: #ffebcd;
scrollbar-darkshadow-color: #8b0000;
}
Apply this style to the BODY element of the page to load into the iframe.
body {
scrollbar-face-color: #ff8c00;
scrollbar-track-color: #fff8dc;
scrollbar-arrow-color: #ffffff;
scrollbar-highlight-color: #fff8dc;
scrollbar-shadow-color: #d2691e;
scrollbar-3dlight-color: #ffebcd;
scrollbar-darkshadow-color: #8b0000;
}
Apply this style to the BODY element of the page to load into the iframe.
Property | Value | Explanation |
---|---|---|
scrollbar-base-color | color code or name | (1) the base color |
scrollbar-face-color | color code or name | (2) the face color |
scrollbar-track-color | color code or name | (3) the track color |
scrollbar-arrow-color | color code or name | (4) the arrow color |
scrollbar-highlight-color | color code or name | (5) the highlight color |
scrollbar-shadow-color | color code or name | (6) the shadow color |
scrollbar-3dlight-color | color code or name | (7) the 3D light color |
scrollbar-darkshadow-color | color code or name | (8) the dark shadow color |

2014年1月29日 星期三
html-mouse cursor-pointer css-mouse css-pointer
<!DOCTYPE html>
<html>
<body>
<p>Mouse over the words to change the cursor.</p>
<span style="cursor:auto">auto</span><br>
<span style="cursor:crosshair">crosshair</span><br>
<span style="cursor:default">default</span><br>
<span style="cursor:e-resize">e-resize</span><br>
<span style="cursor:help">help</span><br>
<span style="cursor:move">move</span><br>
<span style="cursor:n-resize">n-resize</span><br>
<span style="cursor:ne-resize">ne-resize</span><br>
<span style="cursor:nw-resize">nw-resize</span><br>
<span style="cursor:pointer">pointer</span><br>
<span style="cursor:progress">progress</span><br>
<span style="cursor:s-resize">s-resize</span><br>
<span style="cursor:se-resize">se-resize</span><br>
<span style="cursor:sw-resize">sw-resize</span><br>
<span style="cursor:text">text</span><br>
<span style="cursor:w-resize">w-resize</span><br>
<span style="cursor:wait">wait</span><br>
<span style="cursor:not-allowed">not-allowed</span><br>
<span style="cursor:no-drop">no-drop</span><br>
</body>
</html>
<html>
<body>
<p>Mouse over the words to change the cursor.</p>
<span style="cursor:auto">auto</span><br>
<span style="cursor:crosshair">crosshair</span><br>
<span style="cursor:default">default</span><br>
<span style="cursor:e-resize">e-resize</span><br>
<span style="cursor:help">help</span><br>
<span style="cursor:move">move</span><br>
<span style="cursor:n-resize">n-resize</span><br>
<span style="cursor:ne-resize">ne-resize</span><br>
<span style="cursor:nw-resize">nw-resize</span><br>
<span style="cursor:pointer">pointer</span><br>
<span style="cursor:progress">progress</span><br>
<span style="cursor:s-resize">s-resize</span><br>
<span style="cursor:se-resize">se-resize</span><br>
<span style="cursor:sw-resize">sw-resize</span><br>
<span style="cursor:text">text</span><br>
<span style="cursor:w-resize">w-resize</span><br>
<span style="cursor:wait">wait</span><br>
<span style="cursor:not-allowed">not-allowed</span><br>
<span style="cursor:no-drop">no-drop</span><br>
</body>
</html>
2013年11月7日 星期四
2013年11月6日 星期三
2013年9月19日 星期四
css-disabled javascript-disabled html-diabled button-css-disabled
css button disabled
button[disabled=disabled], button:disabled {opacity:0.2;}
$('input[type="text"]:not(.approveAllow)').keypress(function(e){e.preventDefault();});
$('input[type="TEXT"]:not(.approveAllow)').keypress(function(e){e.preventDefault();});
$('input[type="text"]:not(.notDisabled,.approveAllow)').each(function() {this.disabled='disabled';})
//20140513 when enable it, status cannot save. $('input:not(.viewUpload)').each(function() {this.disabled='disabled';})
$('select').each(function() {this.disabled='disabled';})
//$('textarea').each(function() {this.disabled='disabled';})
$('button:not(#vView,.whenApprove,.deleteAllowWhenApprove)').each(function() {this.disabled='disabled';})
$('.SaveButton').each(function() {this.disabled='';})
$('input:not(.approveAllow)').prop('readonly', true);
$('textarea:not(.approveAllow)').prop('readonly', true);
$('input[type="text"]').keypress(function(e){e.preventDefault();});
$('input[type="TEXT"]').keypress(function(e){e.preventDefault();});
$('input').keypress(function(e){e.preventDefault();});
$('select').each(function() {this.disabled='disabled';})
$('textarea').each(function() {this.disabled='disabled';})
$('button').each(function() {this.disabled='disabled';})
$('.SaveButton').each(function() {this.disabled='';})
combo control element disabled / enabled
<span>
<label for="com" > Login ID (email)</label>
<select name="userRoleUserID" id="userRoleUserID"
onchange="if(this.value){
$('#admin').removeAttr('disabled');
$('#resetPasswordButton').removeAttr('disabled');
} else {
$('#resetPasswordButton').attr('disabled',true);
$('#admin').attr('disabled',true);
}"></select>
</span>
function _disabled(v_field_,v_mode_){$(v_field_).each(function() {this.disabled=v_mode_;})}
html-disabled
http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_enabled_disabled
<!DOCTYPE html>
<html>
<head>
<style>
input[type="text"]:enabled
{
background:#ffff00;
}
input[type="text"]:disabled
{
background:#dddddd;
}
</style>
</head>
<body>
<form action="">
First name: <input type="text" value="Mickey" /><br>
Last name: <input type="text" value="Mouse" /><br>
Country: <input type="text" disabled="disabled" value="Disneyland" /><br>
</form>
</body>
</html>
http://www.456bereastreet.com/lab/styling-form-controls-revisited/disabled/
[disabled] { /* Text and background colour, medium red on light yellow */
color:#933;
background-color:#ffc;
}
2013年9月12日 星期四
css-min-width
html-min-width
inf : http://www.tagindex.net/css/form/example_max1.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Example page</title>
<style type="text/css">
<!--
body {background-color: #ffffff;color: #000000;}
.example {width: 100%;max-width: 600px;min-width: 500px;}
textarea {height: 10em;}
.Return {margin-top: 100px;text-align: center;}
a:link { color: #0000ff; }
a:visited { color: #800080; }
a:active { color: #ff0000; }
-->
</style>
</head>
<body>
<p>minimum width:500px - maximum width:600px</p>
<form method="GET" action="example_max1.html">
<p><input type="text" name="item1" class="example"></p>
<p><select name="item2" class="example">
<option value="select1">Select1</option>
<option value="select2">Select2</option>
<option value="select3">Select3</option>
</select></p>
<p><textarea name="item3" cols="50" rows="10" class="example"></textarea></p>
</form>
<p class="Return"><a href="max_width.html">Return</a></p>
</body>
</html>
inf : http://www.tagindex.net/css/form/example_max1.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Example page</title>
<style type="text/css">
<!--
body {background-color: #ffffff;color: #000000;}
.example {width: 100%;max-width: 600px;min-width: 500px;}
textarea {height: 10em;}
.Return {margin-top: 100px;text-align: center;}
a:link { color: #0000ff; }
a:visited { color: #800080; }
a:active { color: #ff0000; }
-->
</style>
</head>
<body>
<p>minimum width:500px - maximum width:600px</p>
<form method="GET" action="example_max1.html">
<p><input type="text" name="item1" class="example"></p>
<p><select name="item2" class="example">
<option value="select1">Select1</option>
<option value="select2">Select2</option>
<option value="select3">Select3</option>
</select></p>
<p><textarea name="item3" cols="50" rows="10" class="example"></textarea></p>
</form>
<p class="Return"><a href="max_width.html">Return</a></p>
</body>
</html>
2013年9月11日 星期三
css-fonts
This is an example of a serif font.
This is an example of a sans-serif font.
This is an example of a monospace font.
This is an example of a cursive font.
This is an example of a fantasy font.
inf : http://www.w3.org/Style/Examples/007/fonts.en.html
inf : http://www.w3.org/Style/Examples/007/fonts.en.html
rule | serif | sans-serif | |||
---|---|---|---|---|---|
Styles | |||||
font-style: normal | The Quick… | The Quick… | |||
font-style: italic | The Quick… | The Quick… | |||
font-style: oblique | The Quick… | The Quick… | |||
Weights | |||||
font-weight: 100 | The Quick… | The Quick… | |||
font-weight: 200 | The Quick… | The Quick… | |||
font-weight: 300 | The Quick… | The Quick… | |||
font-weight: normal | The Quick… | The Quick… | |||
font-weight: 500 | The Quick… | The Quick… | |||
font-weight: 600 | The Quick… | The Quick… | |||
font-weight: bold | The Quick… | The Quick… | |||
font-weight: 800 | The Quick… | The Quick… | |||
font-weight: 900 | The Quick… | The Quick… | |||
Variants | |||||
font-variant: normal | The Quick… | The Quick… | |||
font-variant: small-caps | The Quick… | The Quick… | |||
Stretch | |||||
font-stretch: ultra-condensed | The Quick… | The Quick… | |||
font-stretch: extra-condensed | The Quick… | The Quick… | |||
font-stretch: condensed | The Quick… | The Quick… | |||
font-stretch: semi-condensed | The Quick… | The Quick… | |||
font-stretch: normal | The Quick… | The Quick… | |||
font-stretch: semi-expanded | The Quick… | The Quick… | |||
font-stretch: expanded | The Quick… | The Quick… | |||
font-stretch: extra-expanded | The Quick… | The Quick… | |||
font-stretch: ultra-expanded | The Quick… | The Quick… |
css-text css-aecord
text-disabled
input[type="text"][disabled] {color:black;}
text-readonly
input[type="text"][readonly] {color:gray; background:#dddddd;}
body {color:red;}
h1 {color:#00ff00;}
p.ex {color:rgb(0,0,255);}
h1 {text-align:center;}
p.date {text-align:right;}
p.main {text-align:justify;}
a {text-decoration:none;}
h1 {text-decoration:overline;}
h2 {text-decoration:line-through;}
h3 {text-decoration:underline;}
p.uppercase {text-transform:uppercase;}
p.lowercase {text-transform:lowercase;}
p.capitalize {text-transform:capitalize;}
p {text-indent:50px;} *
h1 {letter-spacing:2px;}
h2 {letter-spacing:-3px;}
p.small {line-height:70%;}
p.big {line-height:200%;}
div.ex1 {direction:rtl;}
word-spacing:30px;
white-space:nowrap;
img.top {vertical-align:text-top;}
img.bottom {vertical-align:text-bottom;}
css-background
http://www.w3schools.com/css/tryit.asp?filename=trycss_background_shorthand2
body {background-image:url('bgdesert.jpg');}
body {background-image:url('paper.gif');}
body{background-color:#b0c4de;}
h1 { background-color:#6495ed; }
p { background-color:#e0ffff; }
div { background-color:#b0c4de; }
body
{
background-image:url('gradient2.png');
background-repeat:repeat-x;
}
http://www.w3schools.com/css/tryit.asp?filename=trycss_background-image_position
body
{
background-image:url('img_tree.png');
background-repeat:no-repeat;
background-position:right top;
margin-right:200px;
}
http://www.w3schools.com/css/tryit.asp?filename=trycss_background-image_position
body
{
background:#ffffff url('img_tree.png') no-repeat right top;
margin-right:200px;
}
http://www.w3schools.com/css/tryit.asp?filename=trycss_background-image_position
body
{
background-image:url('w3css.gif');
background-repeat:no-repeat;
background-attachment:fixed;
}
2013年8月24日 星期六
css-command
inf http://ss64.com/css/syntax.html
An A-Z Index of CSS properties
animation -name, -duration, -timing-function -delay -iteration-count -direction -fill-mode CSS3 background -Attachment -Color -Image -Repeat -Position background-Clip The painting area of the background. CSS3 background-Origin The positioning area of the background images. CSS3 background-Size The size of the background images. CSS3 bookmark-label Label a bookmark. CSS3 bookmark-target Target of a bookmark link. CSS3 border -color -style -width Set all 4 borders. border-bottom -bottom-width -bottom-style -bottom-color border-left -left-width -left-style -left-color border-right -right-width -right-style -right-color border-top -top-width -top-style -top-color border-collapse Collapse table borders. border-spacing Distance between the borders of adjacent cells. border-image Set a border image. CSS3 border-radius -top-left-radius -top-right-radius -bottom-left-radius -bottom-right-radius CSS3 bottom Bottom position of a positioned element box-align Align the child elements of a box. CSS3 box-direction The direction in which children of a box are displayed. CSS3 box-flex Whether the children of a box are flexible or inflexible in size. CSS3 box-ordinal-group Display order of the child elements of a box. CSS3 box-orient Position child elements horizontally or vertically. CSS3 box-pack Define the horizontal or vertical position or a box. CSS3 box-shadow Attach one or more drop-shadows to the box. CSS3 box-sizing The CSS box model used to calculate the height and width of elements. CSS3 c clear Set sides of an element where other floating elements are not allowed clip Clip an absolutely positioned image/element. color Text color column-gap Gap between the columns. CSS3 column-rule -rule-color -rule-style -rule-width CSS3 column-span How many columns an element should span across. CSS3 columns -width -count CSS3 content Insert generated content before or after an element. counter-increment Increment one or more counters. CSS3 counter-reset Create or reset one or more counters. CSS3 crop Allow a replaced element to be a cropped area of the whole object. CSS3 cursor The type of cursor to be displayed. d direction The text reading direction, left-to-right or right-to-left. display How to display an HTML element. f float Shift to the left (or right) allowing other content to flow/wrap alongside. font -family -size -style(italic/normal) -variant(small-caps) -weight(Normal/bold) @font-face Download and use a web font. font-size-adjust Attempt to normalise the font size. CSS3 font-stretch Select a normal, condensed, or expanded font face. CSS3 g grid-columns Width of each column in a grid. CSS3 grid-rows Height of each column in a grid. CSS3 h height Height of an element. max-height Maximum height of an element. min-height Minimum height of an element. hyphens How to split words to improve the paragraph layout. CSS3 l left Left position of a positioned element. Letter-Spacing Increase or decrease the space between characters. line-height Line height. list-style -image -position -type list-item markers. m margin -top -right -bottom -left marquee -direction -play-count -speed -style Moving content. max-width Maximum width of an element. min-width Minimum width of an element. o opacity Opacity level for an element. CSS3 outline -color -style -width outline-offset Offset an outline, and draw it beyond the border edge. CSS3 overflow What happens if content overflows an element's box. overflow-x Whether to clip the left/right edges of overflowing content. CSS3 overflow-y Whether to clip the top/bottom edges of overflowing content. CSS3 text-overflow What should happen when text overflows the containing element. CSS3 p padding -bottom -left -right -top page-break-after Adjust page breaks after the current element. page-break-before Adjust page breaks before the current element. position Positioning method for an element. (static, relative, absolute or fixed) q quotes Type of quotation marks for embedded quotations. r right Right position of a positioned element. t table-layout How to layout table columns. top Top position of a positioned element. text-align Horizontal alignment of text. text-decoration Add decoration to text. text-indent Indent the first line in a text-block. text-overflow What should happen when text overflows the containing element. CSS3 text-shadow Add a shadow to text. CSS3 text-transform Change the capitalization of text. text-align-last How to align the last line of text. CSS3 text-justify Justification method used when text-align is "justify". CSS3 transform Apply a 2D or 3D transformation to an element. CSS3 transform-origin Change the position of transformed elements. CSS3 transform-style How nested elements are rendered in 3D space. CSS3 transition -property -duration -timing-function -delay CSS transition effects. CSS3 u unicode-bidi Control the inline direction of text. user-select Control the selection of text. vertical-align Vertical alignment of an image/element. visibility Hide or show an element. w white-space How white-space inside an element is handled. word-spacing Increase or decrease the space between words in a text. width Width of an element. max-width Maximum width of an element. min-width Minimum width of an element. z-index Stack order of a positioned element. /* This is a CSS comment */
Bold = Shortcut property
Grey = very limited web browser support.
The page includes CSS 1, 2 and 3 but excludes properties that are not supported by any major web browsers.
Most CSS 3 properties will be ignored by IE 7 and IE 8.
CSS References: W3C CSS2,CSS 3, Mozilla CSS, Safari/Webkit CSS, Microsoft CSS
Grey = very limited web browser support.
The page includes CSS 1, 2 and 3 but excludes properties that are not supported by any major web browsers.
Most CSS 3 properties will be ignored by IE 7 and IE 8.
CSS References: W3C CSS2,CSS 3, Mozilla CSS, Safari/Webkit CSS, Microsoft CSS
2013年8月21日 星期三
jquery-css 20141106
multi css Element
{$("a[href*=page2]").css({'color':'#339999','font-weight':'bold'});}
{endOfLoad}var s=_lookup('RECEIPT_HEADER.REMARK'); if(s!=''){$("a[href*=page2]").css({'color':'#339999','font-weight':'bold'});} {/endOfLoad}
jquery-css (it is run under jsp)
if (MODE.equals("INPUT")){out.println("$('.SaveButton').css('display', 'inline');");} //20130821
example
$(".oe_menu_leaft").css('color','');
$(this).css('color','block);
$('.oe_menu_left').css('background','');
$(this).css('background-color','#00ffff');
$('a').css('cursor', 'pointer');
$('a').css('color','red');
$( "ul.level-2" ).children().css( "background-color", "red" ); /*jquery-children()*/
$( "div" ).children( ".selected" ).css( "color", "blue" );
$( "div" ).children().css( "border-bottom", "3px double red" );
2013年8月13日 星期二
css-table
/*table{
table-layout:fixed;
border:1px solid #0058a3;
font-family:Arial;
border-collapse:collapse;
background-color:#eaf5ff;
font-size:14px;
}
table caption{
padding-bottom:5px;
font:bold 1.4em;
text-align:left;
}
table th{
border:1px solid #0058a3;
background-color:#4bacff;
color:#FFFFFF;
font-weight:bold;
padding-top:4px; padding-bottom:4px;
padding-left:12px; padding-right:12px;
text-align:center;
}
table td{
border:1px solid #0058a3;
text-align:left;
valign:center;
padding-top:0px; padding-bottom:0px; */ /*control the object inside the box */
padding-left:0px; padding-right:0px; /*control the object inside the box */
}*/
/* table tr:hover, table tr.altrow{
background-color:#c4e4ff;
}*/
==========================================================
<html>
<head>
<style type="text/css">
table.ex1 {table-layout:auto}
table.ex2 {table-layout:fixed}
</style>
</head>
<body>
<table class="ex1" border="1" width="100%">
<tr>
<td width="5%">1000000000000000000000000000</td>
<td width="95%">10000000</td>
</tr>
</table>
<br />
<table class="ex2" border="1" width="100%">
<tr>
<td width="5%">1000000000000000000000000000</td>
<td width="95%">10000000</td>
</tr>
</table>
</body>
</html>
2013年8月9日 星期五
html-input-file
html-input-file
demo : http://jsfiddle.net/dipaks2011/2JJsH/14/
http://qianduanblog.com/1174.html
http://dipaksblogonline.blogspot.hk/2012/07/styling-input-type-file.html
*{margin:0;padding:0;}
a{text-decoration:none;}
.btn_addPic{
display: block;
position: relative;
width: 140px;
height: 39px;
overflow: hidden;
border: 1px solid #EBEBEB;
background: none repeat scroll 0 0 #F3F3F3;
color: #999999;
cursor: pointer;
text-align: center;
}
.btn_addPic span{display: block;line-height: 39px;}
.btn_addPic em {
background:url(http://p7.qhimg.com/t014ce592c1a0b2d489.png) 0 0;
display: inline-block;
width: 18px;
height: 18px;
overflow: hidden;
margin: 10px 5px 10px 0;
line-height: 20em;
vertical-align: middle;
}
.btn_addPic:hover em{background-position:-19px 0;}
.filePrew {
display: block;
position: absolute;
top: 0;
left: 0;
width: 140px;
height: 39px;
font-size: 100px; /* 增大不同浏览器的可点击区域 */
opacity: 0; /* 实现的关键点 */
filter:alpha(opacity=0);/* 兼容IE */
}
<form><a class="btn_addPic" href="javascript:void(0);">
<span><em>+</em>Upload</span>
<input class="filePrew" title="支持jpg、jpeg、gif、png格式,文件小于5M"
tabindex="3" name="pic" size="13" type="file" value="abcd"></a>
</form>
demo : http://jsfiddle.net/dipaks2011/2JJsH/14/
http://qianduanblog.com/1174.html
http://dipaksblogonline.blogspot.hk/2012/07/styling-input-type-file.html
*{margin:0;padding:0;}
a{text-decoration:none;}
.btn_addPic{
display: block;
position: relative;
width: 140px;
height: 39px;
overflow: hidden;
border: 1px solid #EBEBEB;
background: none repeat scroll 0 0 #F3F3F3;
color: #999999;
cursor: pointer;
text-align: center;
}
.btn_addPic span{display: block;line-height: 39px;}
.btn_addPic em {
background:url(http://p7.qhimg.com/t014ce592c1a0b2d489.png) 0 0;
display: inline-block;
width: 18px;
height: 18px;
overflow: hidden;
margin: 10px 5px 10px 0;
line-height: 20em;
vertical-align: middle;
}
.btn_addPic:hover em{background-position:-19px 0;}
.filePrew {
display: block;
position: absolute;
top: 0;
left: 0;
width: 140px;
height: 39px;
font-size: 100px; /* 增大不同浏览器的可点击区域 */
opacity: 0; /* 实现的关键点 */
filter:alpha(opacity=0);/* 兼容IE */
}
<form><a class="btn_addPic" href="javascript:void(0);">
<span><em>+</em>Upload</span>
<input class="filePrew" title="支持jpg、jpeg、gif、png格式,文件小于5M"
tabindex="3" name="pic" size="13" type="file" value="abcd"></a>
</form>
2013年7月30日 星期二
html ul li e.g. example eg sample
to css page header
<ul id=:"nav">
<li><a href="home.html">home</a>,/li>
<li><a href="about.html">About Us</a>,/li>
<li><a href="product.html">Our Product</a>,/li>
</ul>
no . style
ul#nav,ul#nav li{
list-style:none;
margin:0;
padding:0;
}
on a line style
ul#nav,ul#nav li{
float:left;
list-style:none;
margin:0;
padding:0;
}
Button style
ul#nav{
font-family:aaaaa;
font-size:.82em;
background-color:#DDD;
}
ul#nav li a{
border: 1px solid #000;
display:block;
float:left;
padding: 3px;
}
<ul id=:"nav">
<li><a href="home.html">home</a>,/li>
<li><a href="about.html">About Us</a>,/li>
<li><a href="product.html">Our Product</a>,/li>
</ul>
no . style
ul#nav,ul#nav li{
list-style:none;
margin:0;
padding:0;
}
on a line style
ul#nav,ul#nav li{
float:left;
list-style:none;
margin:0;
padding:0;
}
Button style
ul#nav{
font-family:aaaaa;
font-size:.82em;
background-color:#DDD;
}
ul#nav li a{
border: 1px solid #000;
display:block;
float:left;
padding: 3px;
}
css selector eg sample example css-selector
http://hongkong2000.freehostia.com/html/css0.html
selector {property : value}
[lang] [rel] [href]
:hover, :visited, :first-child
li.active
Attribute Selector :
input [type="text"]{color:#000; font-size:12px; font-family:}
input[type="text"] {font-size:<%=FontSize%>;}
p[lang="fr"]
html: <p lang="fr" class="className">
p[lang~="fr"]
html: <p lang="fr" class="className">
html: <p lang="la sp fr" class="className">
p[lang |= "en"]
html: <p lang="en" class="className">
html: <p lang="en-US" class="className">
Type Selector :
body {color:#000; font-size:12px; font-family:}
h1{color:red}
Universal Selector : * {color : #000}
Descendant Selectors :
<p> I just <em> Love </em> emphasis</p>
<ul><li>I just <em> Love </em> emphasis</li></ul>
em {text-transform: uppercase;}
ul em {text-transform: uppercase;}
Class Selector :
input.box{border:1px solid #000;}
.text{}
.box{}
id Selectors :
#page-title{}
Child Selectors :
body p {}
Group Selectors :
h1 , h2 ,h3 {}
#content, #footer, #supplement{}
http://www.w3schools.com/cssref/css_selectors.asp
selector {property : value}
[lang] [rel] [href]
:hover, :visited, :first-child
li.active
Attribute Selector :
input [type="text"]{color:#000; font-size:12px; font-family:}
input[type="text"] {font-size:<%=FontSize%>;}
p[lang="fr"]
html: <p lang="fr" class="className">
p[lang~="fr"]
html: <p lang="fr" class="className">
html: <p lang="la sp fr" class="className">
p[lang |= "en"]
html: <p lang="en" class="className">
html: <p lang="en-US" class="className">
Type Selector :
body {color:#000; font-size:12px; font-family:}
h1{color:red}
Universal Selector : * {color : #000}
Descendant Selectors :
<p> I just <em> Love </em> emphasis</p>
<ul><li>I just <em> Love </em> emphasis</li></ul>
em {text-transform: uppercase;}
ul em {text-transform: uppercase;}
Class Selector :
input.box{border:1px solid #000;}
.text{}
.box{}
id Selectors :
#page-title{}
Child Selectors :
body p {}
Group Selectors :
h1 , h2 ,h3 {}
#content, #footer, #supplement{}
http://www.w3schools.com/cssref/css_selectors.asp
CSS Selectors
In CSS, selectors are patterns used to select the element(s) you want to style.
The "CSS" column indicates in which CSS version the property is defined (CSS1, CSS2, or CSS3).
Selector | Example | Example description | CSS |
---|---|---|---|
.class | .intro | Selects all elements with class="intro" | 1 |
#id | #firstname | Selects the element with id="firstname" | 1 |
* | * | Selects all elements | 2 |
element | p | Selects all <p> elements | 1 |
element,element | div,p | Selects all <div> elements and all <p> elements | 1 |
element element | div p | Selects all <p> elements inside <div> elements | 1 |
element>element | div>p | Selects all <p> elements where the parent is a <div> element | 2 |
element+element | div+p | Selects all <p> elements that are placed immediately after <div> elements | 2 |
[attribute] | [target] | Selects all elements with a target attribute | 2 |
[attribute=value] | [target=_blank] | Selects all elements with target="_blank" | 2 |
[attribute~=value] | [title~=flower] | Selects all elements with a title attribute containing the word "flower" | 2 |
[attribute|=value] | [lang|=en] | Selects all elements with a lang attribute value starting with "en" | 2 |
:link | a:link | Selects all unvisited links | 1 |
:visited | a:visited | Selects all visited links | 1 |
:active | a:active | Selects the active link | 1 |
:hover | a:hover | Selects links on mouse over | 1 |
:focus | input:focus | Selects the input element which has focus | 2 |
:first-letter | p:first-letter | Selects the first letter of every <p> element | 1 |
:first-line | p:first-line | Selects the first line of every <p> element | 1 |
:first-child | p:first-child | Selects every <p> element that is the first child of its parent | 2 |
:before | p:before | Insert content before the content of every <p> element | 2 |
:after | p:after | Insert content after every <p> element | 2 |
:lang(language) | p:lang(it) | Selects every <p> element with a lang attribute equal to "it" (Italian) | 2 |
element1~element2 | p~ul | Selects every <ul> element that are preceded by a <p> element | 3 |
[attribute^=value] | a[src^="https"] | Selects every <a> element whose src attribute value begins with "https" | 3 |
[attribute$=value] | a[src$=".pdf"] | Selects every <a> element whose src attribute value ends with ".pdf" | 3 |
[attribute*=value] | a[src*="w3schools"] | Selects every <a> element whose src attribute value contains the substring "w3schools" | 3 |
:first-of-type | p:first-of-type | Selects every <p> element that is the first <p> element of its parent | 3 |
:last-of-type | p:last-of-type | Selects every <p> element that is the last <p> element of its parent | 3 |
:only-of-type | p:only-of-type | Selects every <p> element that is the only <p> element of its parent | 3 |
:only-child | p:only-child | Selects every <p> element that is the only child of its parent | 3 |
:nth-child(n) | p:nth-child(2) | Selects every <p> element that is the second child of its parent | 3 |
:nth-last-child(n) | p:nth-last-child(2) | Selects every <p> element that is the second child of its parent, counting from the last child | 3 |
:nth-of-type(n) | p:nth-of-type(2) | Selects every <p> element that is the second <p> element of its parent | 3 |
:nth-last-of-type(n) | p:nth-last-of-type(2) | Selects every <p> element that is the second <p> element of its parent, counting from the last child | 3 |
:last-child | p:last-child | Selects every <p> element that is the last child of its parent | 3 |
:root | :root | Selects the document’s root element | 3 |
:empty | p:empty | Selects every <p> element that has no children (including text nodes) | 3 |
:target | #news:target | Selects the current active #news element (clicked on a URL containing that anchor name) | 3 |
:enabled | input:enabled | Selects every enabled <input> element | 3 |
:disabled | input:disabled | Selects every disabled <input> element | 3 |
:checked | input:checked | Selects every checked <input> element | 3 |
:not(selector) | :not(p) | Selects every element that is not a <p> element | 3 |
::selection | ::selection | Selects the portion of an element that is selected by a user | 3 |
訂閱:
文章 (Atom)