How to set opacity?

There is a code


How to make so that when you hover over the card was removed the inscription T. E. K. S. T and there are text, text1, text2?

Best done through opacity, visability or display?
March 20th 20 at 11:43
2 answers
March 20th 20 at 11:45
Solution
Did no pointer on hover +opacity
@thelma.McClure92 Thank you very much! - Dante.White commented on March 20th 20 at 11:48
March 20th 20 at 11:47
It's your needs, bear in mind that the display hides the element and removes it from the stream, opacity and visibility will hide the element but keep reserved a place for him
@adrien But what is best for that particular example? - Dante.White commented on March 20th 20 at 11:50
I try to use the display, to avoid unnecessary elements, but then the transition will not work, smoothness will only opacity, but since you need havero, it would be better if I would add JavaScript, in your case, will be true or opacity or visibility, here is your preference. And you better not do background: #333;
Background-color do, because your property in the future can kill the rest. And generally try each of this, I'm just writing to the phone and see good code can not) understand importantly, with display and visibility the animation will not - Catharine_Sanford80 commented on March 20th 20 at 11:53
It's just hard to say on the piece of code without seeing the entire block and flow - Catharine_Sanford80 commented on March 20th 20 at 11:56
And if you want to write, start a class name to write correctly, and then you have if they are with other code, it is hard to sort out what belongs to what, you can read about BEM from Yandex, everything is in Russian and to start work in half an hour you can understand the basics - Catharine_Sanford80 commented on March 20th 20 at 11:59

Find more questions by tags CSS