那些總記不住的css,而且還經常用到

2021-10-24 12:46:00 字數 1528 閱讀 7114

一、設定input 的placeholder的字型樣式

input::-webkit-input-placeholder 

input::-moz-placeholder

input:-ms-input-placeholder

input:-moz-placeholder

設定input聚焦時的樣式

input:focus
取消input的邊框

border: none;

outline: none;

二、隱藏滾動條或更改滾動條樣式

/*css主要部分的樣式*//*定義滾動條寬高及背景,寬高分別對應橫豎滾動條的尺寸*/

::-webkit-scrollbar

/*定義滾動條的軌道顏色、內陰影及圓角*/

::-webkit-scrollbar-track

/*定義滑塊顏色、內陰影及圓角*/

::-webkit-scrollbar-thumb

/*定義兩端按鈕的樣式*/

::-webkit-scrollbar-button

/*定義右下角匯合處的樣式*/

::-webkit-scrollbar-corner

三、文字超出隱藏並顯示省略號單行(一定要有寬度)

width:200rpx;

white-space: nowrap;

overflow: hidden;

text-overflow: ellipsis;

多行

word-break: break-all;

display: -webkit-box;

-webkit-line-clamp: 2;

-webkit-box-orient: vertical;

overflow: hidden;

四、控制div內的元素自動換行

word-wrap: break-word;

word-break:break-all;

五、 純css畫三角形

#demo
六、 絕對定位元素居中(水平和垂直方向)

#demo
七、**邊框合併

table,tr,td

table

mysql那些總是記不住的坑 1

廢話少說 純手打的筆記,就是不想記這些東西 ovo 1.查詢指定日期和指定的月份 select from list notify where date format past date,y m d 20180720 select from list notify where date format ...

那些年總是記不住的前端寫法!

easyui 的時間格式 錯誤的 正確的 js設定下拉框disable 取值不行,combotree換成combobox也是一樣的 systemtype combobox js設定下拉框easyui combobox唯讀 id combobox readonly true 唯讀 id combobo...

總是記不住但又總是要用的css

input webkit input placeholder input moz placeholder input ms input placeholder input moz placeholderinput focusinput css主要部分的樣式 定義滾動條寬高及背景,寬高分別對應橫豎滾動...