標籤:style blog http color io ar strong 檔案 div
<!doctype html><html><head><meta charset="utf-8"><title>無標題文檔</title> <style type="text/css"> body { margin:0; } div { behavior: url(../js/PIE.htc); border: 10px solid green; -webkit-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5), 0px 1px 2px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5), 0px 1px 2px rgba(0, 0, 0, 0.2); box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5), 0px 1px 2px rgba(0, 0, 0, 0.2); background-color: #eeeeee; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fbfbfb), color-stop(100%, #e1e1e1)); background: -webkit-linear-gradient(top, #fbfbfb, #e1e1e1); background: -moz-linear-gradient(top, #fbfbfb, #e1e1e1); background: -o-linear-gradient(top, #fbfbfb, #e1e1e1); background: linear-gradient(top, #fbfbfb, #e1e1e1); display: -moz-inline-stack; display: inline-block; vertical-align: middle; *vertical-align: auto; zoom: 1; *display: inline; border: 1px solid #d4d4d4; height: 32px; line-height: 32px; padding: 0px 25.6px; font-weight: 300; font-size: 14px; font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; color: #666666; text-shadow: 0 1px 1px white; margin: 0; text-decoration: none; text-align: center; }.button { -webkit-transition-property: background, color; -moz-transition-property: background, color; -o-transition-property: background, color; transition-property: background, color; -webkit-transition-duration: 0.3s; -moz-transition-duration: 0.3s; -o-transition-duration: 0.3s; transition-duration: 0.3s; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; background: #00a1cb; color: white; text-shadow: none; border: none; cursor:pointer;}.button-rounded { -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px;}.button:hover { background: #00b5e5;}/* line 183, ../scss/button.scss */.button:active { background: #1495b7; color: #00647f;}.button.disabled { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none;} </style></head><body><p>Test passes if there is a box with rounded corners below.</p> <div class="button button-rounded">Filler Text</div> <input type="button" value="提交" class="button button-rounded" style="width:50px; height:22px;"></body></html>
behavior: url(../js/PIE.htc);
這個引用htc檔案的,指的是html頁面相對於這個htc檔案的路徑,而不是css相對於htc檔案的路徑。
具體源碼的下載
百度雲網盤的地址:
js製作圓角按鈕(相容Google,ie7,ie8)