css 样式,怎样控制下划线长度

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 样式,怎样控制下划线长度相关的知识,希望对你有一定的参考价值。

<html>
<head>
<meta charset="utf-8">
<title>外婆家私房菜:账户管理</title>
<style type="text/css">
#title
margin: 0px;
width: 100%;
height: 45px;
background-color: #d9d9d9;

#text
margin: 0px;
line-height: 40px;
font-size: 22px;
font-weight: 700;
font-family: Microsoft YaHei, Arial;
color: #444;
text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);

body
margin: 0px;

.row
border-bottom: 3px solid #999999 ;
height: 20px;

input[type=checkbox ]
transform: scale(1.5);
-webkit-transform: scale(1.5);


</style>

</head>

<body>
<div id="title">
<center><span id="text">外婆家私房菜:账户管理</span></center>
</div>
<table width="100%" border="0" cellpadding="10" cellspacing="0" id="table">
<tr class="row">
<th width="20%" align="left" valign="middle" class="row"><form>
<input type="checkbox" name="ol">
</form>
</th>
<th width="30%" align="left" class="row">序号</th>
<th width="20%" align="left" class="row">帐号名</th>
<th width="30%" align="left" class="row">类型</th>
</tr>

</table>
</body>
</html>

其实可以写个div,给div的下边框加上线条,控制div的长度就可以了

.token 
    width: 300px;
    border-bottom: 1px solid black;

<div class="token">外婆家私房菜:账户管理</div>

参考技术A 加div,把有下划线的那几个字放在<div class=“有下划线的样式”>这里</div>, 参考技术B 你说的啥子东西! 参考技术C   静态下划线
  a#example4a
text-decoration: none;
background: url(’/pic/20069/200696144112132.gif’) repeat-x 100% 100%;
white-space: nowrap;
padding-bottom: 10px

  浮动花朵效果下划线
  a#example4b
text-decoration: none;
white-space: nowrap;
padding-bottom: 10px;

  a#example4b:hover
background: url(’/pic/20069/200696144112132.gif’) repeat-x 100% 100%;

  静态箭头下划线
  a#example1a
text-decoration: none;
background: url(’/pic/20069/200696144112997.gif’) repeat-x 100% 100%;
white-space: nowrap;
padding-bottom: 5px

 
  浮动动画箭头下划线 (这里箭头会出现滚动,不过这一滚动图片的效果只在部分浏览器中看得到)
  a#example2b
text-decoration: none;
white-space: nowrap;
padding-bottom: 5px;

  a#example2b:hover
background: url(’/pic/20069/200696144113188.gif’) repeat-x 100% 100%;


实现链接的虚线下划线效果
a
color:#3399FF;
font-weight:Normal;
text-decoration:none;

  a:hover
color:#4499EE;
text-decoration:none;
border-bottom: 1px #0099CC dotted

  a控制连接的效果 a:hover控制鼠标移上去的效果。

css代码怎样改变火狐浏览器中滚动条样式

  CSS无法控制滚动条的样式。这里推荐几块滚动条美化的插件给你。
  
1. Windows:全屏窗口滚动插件

  该插件可以很好地实现全屏滚动,每滚动一次即为一屏。比如,用户浏览下一屏幕内容时,只需手动滚动到某一位置,该插件会自动滚动显示下一屏全部内容。对于浏览类似于PPT的内容时比较实用。

  2. Jquery Scroll Follow:滚动跟随插件
  该插件可以使DOM对象随着页面的滚动而移动。你可以设置滚动的速度、偏移等参数。

  3. 列表滚动插件
  该插件可以为任意列表添加上滚动效果。你可以自定义列表的滚动方向和滚动速度。

  4. Sly:灵活的基于ITEM的滚动插件

  SLY提供了很多基于项目(如图像/内容画廊)的滚动选项,支持水平和垂直方向的无限滚动。

5. Coverscroll

  仿苹果的CoverFlow设计,支持滚动条、鼠标滚轮和手势来滚动查看。

6. Sticky
 该插件可以让你的页面中的任何元素在滚动过程中始终可见

7. Tiny Scrollbar:一个轻量级的JQUERY插件

8. Sticky Float:另一个滚动跟随插件

9. Page Scroller:漂亮实用的滚动导航

10. Custom Srollbar:自定义内容滚动条插件

11. Scroll Up:一个轻量级的滚动到顶部插件
参考技术A scrollbar-3d-light-color 设置或检索滚动条亮边框颜色
scrollbar-highlight-color 设置或检索滚动条3D界面的亮边(ThreedHighlight)颜色
scrollbar-face-color 设置或检索滚动条3D表面(ThreedFace)的颜色
scrollbar-arrow-color 设置或检索滚动条方向箭头的颜色
scrollbar-shadow-color 设置或检索滚动条3D界面的暗边(ThreedShadow)颜色
scrollbar-dark-shadow-color 设置或检索滚动条暗边框(ThreedDarkShadow)颜色
scrollbar-base-color 设置或检索滚动条基准颜色。其它界面颜色将据此自动调整
参考技术B <style>
.over

height: 20px;
overflow: scroll;
overflow-x: hidden;
overflow-y: auto;

</style>

<div class="over">
sdfsdfsdf<p>
sdfsdfsdf<p>
sdfsdfsdf<p>
sdfsdfsdf<p>
</div>
参考技术C @-moz-document url-prefix(http://),
url-prefix(https://),
url("chrome://browser/content/bookmarks/bookmarksPanel.xul"),
url("chrome://browser/content/browser.xul"),
url("chrome://browser/content/history/history-panel.xul")
/* THIS WHOLE CODE SECTION AUTOHIDES ONLY THE VERTICAL SCROLLBARS OF WEBPAGES */
scrollbar *
scrollbar scrollbarbutton display: none ! important;
scrollbar scrollbarbutton visibility: collapse !important

scrollbar[orient="vertical"]
background: transparent url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAACCAYAAABsfz2XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAhSURBVHjaYvj//z8DMvb39/+PLoaMmRhIBAAAAAD//wMAB6Qizv4lfkgAAAAASUVORK5CYII=") ! important;

-moz-appearance: none !important;
background-color: transparent !important;
opacity: .75 !important;
min-width: 9px !important;
max-width: 9px !important;


/*CAN CHANGE SCROLLBAR WIDTH FROM Default 17px (MUST CHANGE BOTH min-width and max-width to exact same px */
/*Default vertical scrollbar width is 17px */
scrollbar[orient="vertical"]:hover

opacity: 1 !important;
-moz-appearance: none !important;
background-color: transparent !important;
min-width: 9px !important;
max-width: 9px !important;

/************************************************************************/

/* button you drag down the strip */

scrollbar thumb[orient="vertical"]

background: transparent url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAnSURBVHjaYmQofPWfgQjwv0+UkYGBgYGJgUQwqmGkaAAAAAD//wMA+/4EFULQY9sAAAAASUVORK5CYII=") ! important;

-moz-appearance: none !important;
border-radius: 4px !important;
min-width: 8px !important;
max-width: 8px !important;
border: 1px !important;


/* HOVER:button you drag down the strip */

scrollbar thumb[orient="vertical"]:hover

background: transparent url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAnSURBVHjaYmQofPWfgQjwv0+UkYGBgYGJgUQwqmGkaAAAAAD//wMA+/4EFULQY9sAAAAASUVORK5CYII=") ! important;

border-radius: 4px !important;
border: 0px !important;


/***************************************************************************/

/*////////////////////////////////////////////////////////////////////////////*/

/* THIS WHOLE CODE SECTION AUTOHIDES ONLY THE HORIZONTAL SCROLLBARS OF WEBPAGES */
/*can increase min-height 5px and max-height 5px to have more grab space for horizontal scrollbar (min-height and max-height must be exact same px)*/

scrollbar[orient="horizontal"]
background: transparent url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAMCAYAAABIvGxUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAmSURBVHjaYvz//z8DAwMDAxMDFGAyGP39/f8zMDAwMBKhGA8DMAB8qAf8L6w8LwAAAABJRU5ErkJggg==") ! important;

-moz-appearance: none !important;
background-color: transparent !important;
opacity: .75 !important;
min-height: 9px !important;
max-height: 9px !important;


/*CAN MAKE HORIZONTAL SCROLLBARS LESS HEIGHT when hovered BELOW:MUST HAVE min-height and max-height exact same px */
/* Default horizontal height is 17px */
scrollbar[orient="horizontal"]:hover

opacity: 1 !important;
-moz-appearance: none !important;
background-color: transparent !important;
min-height: 9px !important;
max-height: 9px !important;


/*////////////////////// bar /////////////////////////////////////////*/

/* button you drag down the strip */

scrollbar thumb[orient="horizontal"]

background: transparent url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAmSURBVHjaYmQofPWfgQTAxEAiGNUwODQw/v//n7Y2AAAAAP//AwCb0AVuQc6u0wAAAABJRU5ErkJggg==") ! important;

-moz-appearance: none !important;
border-radius: 4px !important;
min-height: 8px !important;
max-height: 8px !important;
border: 1px !important;
margin-left: 0px !important;


/* HOVER:button you drag down the strip */

scrollbar thumb[orient="horizontal"]:hover

background: transparent url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAmSURBVHjaYmQofPWfgQTAxEAiGNUwODQw/v//n7Y2AAAAAP//AwCb0AVuQc6u0wAAAABJRU5ErkJggg==") ! important;

border-radius: 4px !important;
border: 0px !important;


/*///////////////////////////////////////////////////////////////////*/

/* REMOVES THE SCROLLBAR CORNERS THAT CAN BE SEEN ON DARK COLORED WEBPAGES */

scrollcorneropacity: 0 !important;

scrollbar scrollcorner:hover background:transparent !important;

以上是关于css 样式,怎样控制下划线长度的主要内容,如果未能解决你的问题,请参考以下文章

CSS自定义下划线样式问题(高手进)

超链接如何加下划线 css

制作网页时如何去掉超链接文字下的下划线?

在css中,如何设置一部分超链接有下划线,一部分没有下划线

怎样用css去除超链接的下划线

没有定义CSS链接下划线,为啥还有下划线