Change opacity of some content with mouse hover

57 views
Skip to first unread message

Mohammad

unread,
Jul 26, 2018, 1:12:15 PM7/26/18
to TiddlyWiki
Tobias Beer has a small CSS to hide the tiddler buttons and display them with mouse over the tiddler


.tc-tiddler-frame .tc-titlebar button {
opacity: 0;
transition: opacity .5s ease-in-out;
}
.tc-tiddler-frame:hover .tc-titlebar button {
zoom: 1;
filter: alpha(opacity=100);
opacity: 1;
}


I want to use the same ides and defined a custom class like mycls and then

.tc-tiddler-frame .tc-titlebar .mycls {
opacity: 0;
transition: opacity .5s ease-in-out;
}
.tc-tiddler-frame:hover .tc-titlebar .mycls{
zoom: 1;
filter: alpha(opacity=100);
opacity: 1;
}

and inside a tiddler I used it like below


<div class="mycls">

! Hello

This is a test.

</div>


but it does not work!
Any comment idea?


Note I can change opacity for a block with mouse hover, it needs to have mouse over that block! but here I want to change opacity when mouse over the tiddler.

Mohammad


Mohammad

unread,
Jul 26, 2018, 2:15:27 PM7/26/18
to TiddlyWiki
I found the solution. The below code works

.tc-tiddler-frame .mycls {
opacity: 0;
transition: opacity .5s ease-in-out;
}
.tc-tiddler-frame:hover .mycls{
Reply all
Reply to author
Forward
0 new messages