html5 悬停边框,Html,css:在悬停时更改行的边框颜色(Html,css: Change a row's border colow on hover)...
Html,css:在懸停時更改行的邊框顏色(Html,css: Change a row's border colow on hover)
我正在使用DataTables,我試圖在行懸停時將行的頂部和底部邊框更改為紅色。 以下沒有改變顏色。
table.dataTable.hover tbody tr:hover,
table.dataTable.hover tbody tr.odd:hover,
table.dataTable.hover tbody tr.even:hover,
table.dataTable.display tbody tr:hover,
table.dataTable.display tbody tr.odd:hover,
table.dataTable.display tbody tr.even:hover {
background-color: rgba(209, 231, 255, 0.5);
border-bottom: 1px solid red;
border-top: 1px solid red;
}
I am using DataTables and i am trying to change the row's top and bottom border to red on row hover. Following didn't change the color.
table.dataTable.hover tbody tr:hover,
table.dataTable.hover tbody tr.odd:hover,
table.dataTable.hover tbody tr.even:hover,
table.dataTable.display tbody tr:hover,
table.dataTable.display tbody tr.odd:hover,
table.dataTable.display tbody tr.even:hover {
background-color: rgba(209, 231, 255, 0.5);
border-bottom: 1px solid red;
border-top: 1px solid red;
}
Anyone knows how to properly do this ? jsfiddle: http://jsfiddle.net/d1zqsayh/
原文:https://stackoverflow.com/questions/26203691
2020-02-25 10:02
滿意答案
你可以這樣做:
table.dataTable tbody tr td{
border-bottom: 1px solid transparent;
}
table.dataTable tbody tr:hover td {
border-top: red 1px solid;
border-bottom: red 1px solid;
}
You can do something like this:
table.dataTable tbody tr td{
border-bottom: 1px solid transparent;
}
table.dataTable tbody tr:hover td {
border-top: red 1px solid;
border-bottom: red 1px solid;
}
相關(guān)問答
您必須在標簽上顯示padding ,而不是li標簽。 .lefttabs li
{
list-style:none;
}
.lefttabs li a
{
list-style:none;
display:block;
padding: 0px 0px 30px 0px;
}
You have to display your padding to your a tag and not to your li tag. .lefttabs li
{
lis...
你可以單獨在CSS中實現(xiàn)。 您只需要使:hover規(guī)則比td.highlight更具體。 嘗試這個: #infotable tr:hover td,
#infotable tr:hover td.highlight
{
background:yellow;
}
示例小提琴 You can achieve this in CSS alone. You just need to make the :hover rule more specific than the td.highlight....
我知道答案已被標記為已回答,但我發(fā)現(xiàn)一個解決方案不使用calc而是使用nth-child ,它具有比calc更好的兼容性表 。 .outer {
position: relative;
overflow: hidden;
display: inline-block;
}
.myborder {
content: '';
position: absolute;
bottom: 5%;
left: 20%;
width: 40%;
heig...
更新.hvr-bubble-float-top:hover:before的border-bottom-color .hvr-bubble-float-top:hover:before 。 使用您的樣式作為基礎(chǔ): #contact-form > .contact-submit > .hvr-bubble-float-top:hover:before,
#contact-form > .contact-submit > .hvr-bubble-float-top:focus:before,
#cont...
不幸的是,你還不能使用CSS來定位前一個兄弟。 不過,你可以將兩個div放在一個容器中,然后將:hover應(yīng)用于該容器。 HTML
Some text
Some text 2
CSS .container:hover .upperdiv,
.contai...
你應(yīng)該把放在
。 如果您希望它在整個空間中展開,請將display: block添加到其樣式中。We have a range of Education Facilities available for lease and hire
a.sidebarLink...
為您的鏈接提供ID:
然后使用這個css: #page1:hover { color: red; }
#page2:hover { color: blue; }
/* ... */
...
所以我在這里回答我自己的問題。將html保留為空,在CSS中添加':before'的'content',然后在懸停狀態(tài)下更改':before'..請參閱forked Codepen:
.material-icons.md1::before{
font-family: 'Material Icons';
font-weight: normal;
...
出于某種原因,當未在原始元素本身(動畫之前)上設(shè)置border屬性時,動畫似乎不起作用。 將border屬性添加到原始元素似乎解決了它。 基于MDN的可動畫屬性列表 ,似乎border-color和border-width是可動畫的, border-style不是,這可能是我們必須在原始元素中添加它的原因。 但是只添加border-style: solid默認會在幾乎所有瀏覽器中生成邊框(如果不是全部),因此最好指定border-width: 0以及它。 注意: 在IE10,IE11和Firefo...
你可以這樣做: table.dataTable tbody tr td{
border-bottom: 1px solid transparent;
}
table.dataTable tbody tr:hover td {
border-top: red 1px solid;
border-bottom: red 1px solid;
}
在這里看到: http : //jsfiddle.net/d1zqsayh/21/ You can do something li...
相關(guān)文章
Data Week: Becoming a data scientist Data Pointed,
...
網(wǎng)頁上有很多功能是通過鏈接方式傳遞參數(shù),這種功能鏈接普通樣式就是一個超鏈接退出,如果將超鏈接的樣式變成
...
Gao Yuanyuan from after 2005 drama " world fir
...
http://gumstix.org/create-a-bootable-microsd-card.h
...
As you know, I've been playing with Solr lately, tr
...
中文名: 即用即查HTML+CSS標簽參考手冊 作者: 李剛 圖書分類: 網(wǎng)絡(luò) 資源
...
In a time 有一次 Where the sun descends alone, 太陽孤獨的降落
...
曲名: I COULD BE THE ONE 歌手: Donna Lewis 專輯: blue p
...
這篇文件寫的非常好,推薦大家重溫一下: http://highscalability.com/blog
...
Open [Tomcat install dir]\tomcat-users.xmlfor editi
...
最新問答
List lc = driver.findElements(By.cssSelector("table[id*='filter']")); for (WebElement row : lc) { List images = row.findElements(By.tagName("img")); for (WebElement image : images) { image.click(); } } List
我沒有任何問題,但我能夠通過啟用我的彈出窗口攔截器(我使用更好的彈出窗口阻止程序 - Chrome網(wǎng)上應(yīng)用店 )來重現(xiàn)你在運行Chrome 21.0.1180.89的Windows 7上遇到的問題。 如果您使用彈出窗口阻止程序,請嘗試為jsfiddle /您正在使用的站點禁用它。 I didn't have any issues with it, but I was able to reproduce the problem you were having on Windows 7 runnin
opencv已經(jīng)有開源的人臉識別的代碼了,只需要安裝一下,有訓(xùn)練好的關(guān)于人臉的xml文件,然后根據(jù)這兩個xml文件,輸入一張帶有人臉的圖片進行檢測就好了。參考網(wǎng)址:http://www.cnblogs.com/mengdd/archive/2012/08/01/2619043.html 這里說的更詳細一些。matlab是專門針對圖像處理的,不過一般的用matlab實現(xiàn)的,用opencv也都可以做的到。有些時候?qū)atlab代碼轉(zhuǎn)為opencv還是需要一定時間和一定功底的
您需要使用ProximitySensor來檢測手機屏幕何時被覆蓋。 這是一個例子: 在android中使用接近傳感器 You need to use ProximitySensor to detect when the phone screen is covered. Here is an example: Using proximity sensor in android
我認為找到這個的最簡單方法是搜索ProjectName列。 它似乎包含層次結(jié)構(gòu)信息: select c.* from content c where ProjectName+' ' like '%Project 1 %' 額外的空間是確保Project 1與Project 10不匹配。 I found the way to solve. But the actual solution is given by Jayvee. Sorry I didnt know the method it ca
弄清楚了! 它被鏈接到: searchText: 'Search for a member...', 這將自動填充搜索欄的內(nèi)容,并嘗試根據(jù)該搜索詞找到用戶。 刪除此屬性解決了這個問題。 Figured it out! It was linked to: searchText: 'Search for a member...', This will autofill the search bar with content and will attempt to find the user
錯誤2245也可能是密碼歷史記錄問題。 新密碼是最近使用的密碼嗎? 編輯:看起來這個功能在Server 2003 SP 2之后破了。我在使用文檔中的示例從C ++調(diào)用函數(shù)時遇到了同樣的錯誤。 您可能需要使用NetUserSetInfo。 Error 2245 could also be a password history problem. Is the new password one that was used in the recent past? Edit: It looks like
我在網(wǎng)上搜索了很多,為我的問題找到答案。 我花了很多時間,所以我在這里貼出來幫助別人。 為了使GLEW與MinGW一起工作,您應(yīng)該從GLEW網(wǎng)站下載源代碼并放置 來自MinGW \ bin的gcc.exe 來自MinGW32 \ mingw32 \ bin的ar.exe 到GLEWs源文件夾并在該文件夾中創(chuàng)建并運行.bat,如下所示: gcc -DGLEW_NO_GLU -O2 -Wall -W -Iinclude -DGLEW_BUILD -o src/glew.o -c src/glew.
使用模板成員函數(shù)時,您需要使用template關(guān)鍵字,如下所示: my_postoffice.template get_postbox() 和 po.template get_postbox() cf here: http : //ideone.com/W0owY1代碼和這里: 我在哪里以及為什么要放置“template”和“typename”關(guān)鍵字? 有關(guān)何時使用模板關(guān)鍵字的確切說明 You need to use the template keyword when using
你不能,至少在Devel :: REPL調(diào)用Data :: Dump :: Streamer的情況下。 DDS將始終編碼不在\ x20- \ x7e范圍內(nèi)的任何字符。 您可以修改DDS以選擇其他方式。 After reading the source of DDS, I came up with this patch based on the Perl Monks code: $ cat quote.rc { no warnings 'redefine'; sub Data::D
總結(jié)
以上是生活随笔為你收集整理的html5 悬停边框,Html,css:在悬停时更改行的边框颜色(Html,css: Change a row's border colow on hover)...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c 自动生成html文件,webpack
- 下一篇: html5有foreach吗,JavaS