首页 技术 正文
技术 2022年11月14日
0 收藏 526 点赞 3,442 浏览 6130 个字

有些网友对 Smart Framewok 中的 Sample 示例的样式比较感兴趣。由于本人对前端不太精通,但为了满足网友们的需求,只好献丑了。

以下这个简陋的 CSS 样式:

?

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 * {    border: 0;    margin: 0;    padding: 0;    font-weight: normal;    vertical-align: middle;} body {    font-family: Verdana, sans-serif;    font-size: 12px;    margin: 0 auto;    padding: 10px;    width: 980px;} h1, h2, h3, h4 {    font-weight: bold;} h1 {    font-size: 18px;} h2 {    font-size: 16px;} h3 {    font-size: 14px;} h4 {    font-size: 12px;} a,a:before,a:after {    color: blue;    text-decoration: underline;} a:hover {    color: red;} input, select, textarea, button {    font-family: inherit;    font-size: 12px;    outline: none;} textarea {    resize: none;    overflow-y: auto;} select {    border: 1px solid #CCC;    height: 30px;    padding: 5px;    width: 212px;} input[type="text"] {    height: 18px;} input[type="text"],input[type="password"],textarea {    border: 1px solid #CCC;    padding: 5px;    width: 200px;} input[type="text"]:focus,input[type="password"]:focus,textarea:focus,select:focus {    border-color: #000;} input[type="file"] {    border: 1px solid #CCC;    padding: 3px 3px 4px 3px;} button {    background-color: #EEE;    border: 1px solid #CCC;    cursor: pointer;    height: 30px;    padding: 5px;    min-width: 30px;} button:hover:not(:disabled) {    background-color: #DDD;} *:disabled {    background-color: #FFF;    cursor: not-allowed !important;    opacity: 0.5;} .css-form {    border: 1px solid #CCC;} .css-form-header {    border-bottom: 1px solid #CCC;    clear: both;    height: 17px;    padding: 10px;} .css-form-row {    padding: 10px 20px;} .css-form-row label {    cursor: pointer;    float: left;    padding-top: 8px;    width: 100px;} .css-form-footer {    border-top: 1px solid #CCC;    padding: 10px;} .css-table {    border: 1px solid #CCC;    border-collapse: collapse;    width: 100%;    margin-bottom: 10px;} .css-table thead tr td {    border-bottom: 1px solid #CCC;    padding: 10px;} .css-table tbody tr:hover {    background-color: #EEE;} .css-table tbody tr td {    padding: 10px;} .css-panel {    border: 1px solid #CCC;} .css-panel-header {    border-bottom: 1px solid #CCC;    clear: both;    height: 17px;    padding: 10px;} .css-panel-content {    clear: both;    padding: 10px 10px 0 10px;} .css-left {    float: left;} .css-right {    float: right;} .css-row {    clear: both;    height: 30px;    margin-bottom: 10px;} .css-row a {    line-height: 30px;} .css-search {    display: table;} .css-search-button {    display: table-cell;} .css-search-button button {    border-left: none;    height: 30px;} .css-width-10 {    width: 10px !important;} .css-width-25 {    width: 25px !important;} .css-width-50 {    width: 50px !important;} .css-width-75 {    width: 75px !important;} .css-width-100 {    width: 100px !important;} .css-blank-10 {    display: inline-block;    width: 10px;} .css-text-center {    text-align: center;} .css-button-group {    border: 1px solid #CCC;    display: inline-block;    padding-left: 5px;} .css-button-group button {    border: 1px solid transparent;    margin-left: -5px;    width: 30px; /* IE9 */}

示例一:列表

一个简陋的 CSS 样式

?

12345678910111213141516171819202122232425262728293031323334353637383940 <div class="css-panel">    <div class="css-panel-header">        <div class="css-left">            <h3>Product List</h3>        </div>        <div class="css-right">            <a href="product_create.html">New Product</a>        </div>    </div>    <div class="css-panel-content">        <div class="css-row">            <div class="css-left">                <form id="product_search_form" method="post">                    <div class="css-search">                        <input type="text" id="product_name" placeholder="Product Name"/>                        <span class="css-search-button">                            <button type="submit">Search</button>                        </span>                    </div>                </form>            </div>            <div class="css-right">                <div id="product_pager"></div>            </div>        </div>        <table id="product_table" class="css-table">            <thead>                <tr>                    <td>Product Type</td>                    <td>Product Name</td>                    <td>Product Code</td>                    <td>Price</td>                    <td>Description</td>                    <td class="css-width-75">Action</td>                </tr>            </thead>            <tbody></tbody>        </table>    </div></div>

示例二:表单

一个简陋的 CSS 样式

?

123456789101112131415161718192021222324252627282930313233 <form id="product_create_form" method="post" class="css-form">    <div class="css-form-header">        <h3>Create Product</h3>    </div>    <div class="css-form-row">        <label for="product_type_id">Product Type:</label>        <select id="product_type_id" name="productTypeId">            <option value="0"></option>            <option value="1">Mobile Phone</option>            <option value="2">Tablet Computer</option>        </select>    </div>    <div class="css-form-row">        <label for="product_name">Product Name:</label>        <input type="text" id="product_name" name="productName"/>    </div>    <div class="css-form-row">        <label for="product_code">Product Code:</label>        <input type="text" id="product_code" name="productCode"/>    </div>    <div class="css-form-row">        <label for="price">Price:</label>        <input type="text" id="price" name="price"/>    </div>    <div class="css-form-row">        <label for="description">Description:</label>        <textarea id="description" name="description" rows="5"></textarea>    </div>    <div class="css-form-footer">        <button type="submit">Submit</button>        <button type="button" id="cancel">Cancel</button>    </div></form>

 

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,082
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,557
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,406
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,179
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,815
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,898