2017-03-19 134 views
-2

我正在網站上工作的地方,當我們將鼠標懸停在表格上 我的問題是:如何修復和設置背景圖片我爲了顯示時它是動畫的(因此填充增加)但不是從左到右滑動?問題與css過渡和背景圖像

你有什麼想法嗎?

最佳,

這裏是CSS代碼

body .cf7-style.cf7-style-15648 { 
    transition: all 1.5s; 
} 
.sent { 
    background-image: url("http://www.site.fr/wp-content/uploads/2017/03/perverse-paul-serre.gif") !important ; 
    background-position: right bottom; 
    background-repeat: no-repeat; 
    padding-right:205px !important; 
} 
.col.span_12.color-dark.left{ 
display: flex; 
    justify-content: center; 
    align-items: center; 
} 
form.wpcf7-form.demo.cf7-style.cf7-style-15648:hover{ 
padding-right: 205px; 
    transition: all 0.6s ease-in-out; 
} 
form.wpcf7-form.demo.cf7-style.cf7-style-15648{} 
body .cf7-style.cf7-style-15648{ 
padding-right: 10px; 
} 

@media only screen and (max-width: 767px){ 
.col.span_12.color-dark.left{ 
    display: block; 
} 
    form.wpcf7-form.demo.cf7-style.cf7-style-15648{ 
    width:100%; 
     border:none; 
     padding-right:205px; 
    } 
    .col.span_12.color-dark.left{ 
    margin-left: 10px; 
    } 
    .vc_col-sm-7.wpb_column.column_container.col.no-padding.color-dark{ 
     display: flex; 
    justify-content: flex-end; 
} 
} 
+0

請在問題中加入任何相關的代碼 –

+0

你能更具體嗎? –

+0

謝謝你的回答。由於這是一個基於WordPress的網站,因此很難拆開一些特定的代碼。但這裏是與事件相關的CSS。 – Bergenist

回答

1

我瞎猜這裏你的問題不是很清楚,但在這裏不用...

在你的表格你有以下CSS

body .cf7-style.cf7-style-15648:hover { 
    background-image: url(http://www.test.bonnetdejour.fr/wp-content/uploads/2017/03/paul-form-1.gif); 
    background-position: right bottom; 
    background-repeat: no-repeat; 
} 

這是設置background-position上徘徊。當你不徘徊在表格上,這將是使用的默認背景位置:

background-position: left top; 

如果你設置元素的背景位置,而懸停我認爲它會做你想要什麼。

body .cf7-style.cf7-style-15648{ 
    background-position: right bottom; 
    background-repeat: no-repeat; 
} 

body .cf7-style.cf7-style-15648:hover { 
    background-image: url(http://www.test.bonnetdejour.fr/wp-content/uploads/2017/03/paul-form-1.gif); 
} 

對不起,如果我把它都弄錯了,但這是我最好的猜測,因爲你的問題不清楚。

+0

太棒了!非常感謝 – Bergenist