{"id":3732,"date":"2018-03-23T16:19:11","date_gmt":"2018-03-23T16:19:11","guid":{"rendered":"http:\/\/freshinbox.com\/blog\/?p=3732"},"modified":"2018-03-23T16:23:27","modified_gmt":"2018-03-23T16:23:27","slug":"bubble-wrap-in-email-with-sound-effects","status":"publish","type":"post","link":"https:\/\/freshinbox.com\/blog\/bubble-wrap-in-email-with-sound-effects\/","title":{"rendered":"Bubble Wrap in Email With Sound Effects"},"content":{"rendered":"<p><a href=\"https:\/\/freshinbox.com\/examples\/bubble-wrap\/\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2018\/03\/bubblewrap.jpg\" alt=\"\" width=\"341\" height=\"326\" class=\"aligncenter size-full wp-image-3733\" srcset=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2018\/03\/bubblewrap.jpg 341w, https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2018\/03\/bubblewrap-300x287.jpg 300w\" sizes=\"(max-width: 341px) 100vw, 341px\" \/><\/a><\/p>\n<p>Sound effects in email! Yay? Nay? Try it out for yourself with this <a href=\"https:\/\/freshinbox.com\/examples\/bubble-wrap\/\" target=_new>Bubble Wrap in email example here<\/a>.<\/p>\n<p>This example works in iOS Mail, Apple Mail and the Samsung email client. (See <a href=\"https:\/\/freshinbox.com\/resources\/css.php\">support table here<\/a>).<BR><BR><\/p>\n<h4>Wrapping The Play Button<\/h4>\n<p>The core of technique is pretty straightforward. Each bubble consists of an audio control that plays a pop audio file. <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2018\/03\/play-control.jpg\" alt=\"\" width=\"162\" height=\"56\" class=\"aligncenter size-full wp-image-3738\" \/><\/p>\n<p>The secret to this example is to have a wrapper element wrap the audio element such that only the play button is exposed. Setting the opacity of the audio element to 0 will then complete the trick.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2018\/03\/bubblewrap-play.jpg\" alt=\"\" width=\"341\" height=\"326\" class=\"aligncenter size-full wp-image-3736\" srcset=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2018\/03\/bubblewrap-play.jpg 341w, https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2018\/03\/bubblewrap-play-300x287.jpg 300w\" sizes=\"(max-width: 341px) 100vw, 341px\" \/><\/p>\n<p>Having the bubble popping and then re-appearing after a delay is achieved using a transition-delay property that is associated to the &#8220;off&#8221; state of the :active pseudoclass.<BR><BR><\/p>\n<pre class=\"lang:default decode:true \" >.bubble{\r\n  transition-delay:5s;\r\n  box-shadow: inset 0 -10px 12px rgba(0,0,0,.5);\r\n}\r\n.bubble:active{\r\n  transition-delay:0s;\r\n  box-shadow:none!important;\r\n}<\/pre>\n<p><BR><BR><\/p>\n<div style=\"padding:10px; border: 2px solid #99C731;background-color:#FFF8DC;border-radius:5px;\">\n<form action=\"https:\/\/freshinbox1.createsend.com\/t\/i\/s\/adrmi\/\" method=\"post\" id=\"subForm\">\n<span class=\"fisub_header\" style=\"font-weight:bold;\">Subscribe to the #EmailGeeks Newsletter<\/span>\n<p><input id=\"fieldEmail\" name=\"cm-adrmi-adrmi\" type=\"email\" style=\"width:90%\" required placeholder=\"Your Email Address\" \/><\/p>\n<p><button type=\"submit\">Subscribe<\/button><\/p>\n<\/form>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Self regenerating bubble wrap with popping noises. Here&#8217;s an example of making sound effects in email.<BR><BR> <\/p>\n<p>This example works in iOS Mail, Apple Mail and the Samsung email client. Try it out for yourself with this <a href=\"http:\/\/freshinbox.com\/examples\/bubble-wrap\/\">Bubble Wrap in Email example here<\/a>.<\/p>\n","protected":false},"author":2,"featured_media":3733,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[24,47],"tags":[],"_links":{"self":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/3732"}],"collection":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/comments?post=3732"}],"version-history":[{"count":15,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/3732\/revisions"}],"predecessor-version":[{"id":3750,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/3732\/revisions\/3750"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/media\/3733"}],"wp:attachment":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/media?parent=3732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/categories?post=3732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/tags?post=3732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}