/    Sign up×
Community /Pin to ProfileBookmark

Heyo
I have a code that makes a shadow behind a picture.
The shadow is 100%, so everything within it, is blacked out.
How can i make the effect a bit transparent, so a little bit of the background is still shown?

Here’s the code:

[CODE]
<style type=”text/css”>
.shadowcss{
position: relative;
top: -1px;
left: -1px;
filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=1, OffY=1, Color=’dark grey’, Positive=’true’);
}
</style>

<script>
function updownshadow(){
if (event.srcElement.effect==”popshadow”){
shadowobj=event.srcElement
if (event.type==”mousedown”){
shadowobj.filters[0].color=shadowobj.mousedowncolor
shadowobj.style.left=shadowobj.style.top=0
}
else if (event.type==”mouseout” && event.fromElement.effect==”popshadow” || event.type==”mouseup”){
shadowobj.filters[0].color=shadowobj.mouseupcolor
shadowobj.style.left=shadowobj.style.top=shadowobj.filters[0].OffX*(-1)
}
}
}
</script>

<img src=”image.jpg” class=shadowcss effect=popshadow mousedowncolor=white mouseupcolor=gray>
[/CODE]

thnx, greetzzz tAK

to post a comment
Full-stack Developer

0Be the first to comment 😎

×

Success!

Help @The_Anime_King spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...