{"id":2867,"date":"2024-02-11T17:00:53","date_gmt":"2024-02-11T16:00:53","guid":{"rendered":"https:\/\/digitalia.culturanuova.net\/blog\/?p=2867"},"modified":"2024-02-11T17:02:55","modified_gmt":"2024-02-11T16:02:55","slug":"css-mouse-over-on-a-mobile-device","status":"publish","type":"post","link":"https:\/\/digitalia.culturanuova.net\/blog\/?p=2867","title":{"rendered":"css :hover on a mobile device"},"content":{"rendered":"\n<p>There lots of java-scripts to allow an effect such as mouse over on a mobile device (that is without mouse), but there is also a very, very simple solution: to use :active instead of :hover, as in the following example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@media screen and (max-width: 580px) {\n  .tooltip:active .tooltiptext {\n  visibility: visible;\n  opacity: 1;\n}\n}\n\nwhile in <strong>desktop<\/strong> screen you can keep<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>.tooltip:hover .tooltiptext {\n  visibility: visible;\n  opacity: 1;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>There lots of java-scripts to allow an effect such as mouse over on a mobile device (that is without mouse), but there is also a very, very simple solution: to use :active instead of :hover, as in the following example:<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[575,570],"tags":[843,842,156,5,757],"class_list":["post-2867","post","type-post","status-publish","format-standard","hentry","category-android","category-browsers","tag-active","tag-hover","tag-android","tag-css","tag-mobile"],"_links":{"self":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2867"}],"version-history":[{"count":4,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2867\/revisions"}],"predecessor-version":[{"id":2871,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2867\/revisions\/2871"}],"wp:attachment":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}