- This topic is empty.
-
AuthorPosts
-
February 3, 2016 at 9:14 pm #237677Alecar983Participant
http://codepen.io/Alecar983/pen/ZQMXzL
Hey can someone help me make this hexagon have the black bit transparent so you can see the back ground and also make it so it opens a link?
The website is pipanel.co.uk/test.html and I want to make the button link to pipanel.co.uk
February 4, 2016 at 3:07 am #237688Paulie_DMemberFrankly….you’re putting a lot of work (and divs) into something that could be done with an SVG much more efficiently.
February 4, 2016 at 4:52 am #237690Alecar983ParticipantWell I’m pretty new to this, I really don’t know what I’m doing. What’s an svg??
February 4, 2016 at 7:29 am #237693Paulie_DMemberTry seaching this site for SVG…they’re awesome.
February 4, 2016 at 7:52 am #237695bearheadParticipantTo make the black background transparent you can replace the
background:#000000
on .hex-inner withbackground: rgba(0,0,0,.75);
The “.75” controls the level of opacity, so 1 is totally opaque, and 0 is totally transparent.To get the whole thing to be a link, you can simply wrap it in an anchor element, same way you’d make anything else a link ;)
February 4, 2016 at 7:54 am #237696koenigsegg1ParticipantSVG stands for Scalable Vector Graphics (Wikipedia). W3Schools has some good info on how to start using SVG.
Anyway, to answer your original question you need to wrap
.frame
in an anchor tag a with ahref
value of the page your wanting to go to.<a href="http://pipanel.co.uk/test.html"> <div class="frame"> <div class="hex-outer h1"></div> <div class="hex-outer h2"></div> <div class="hex-outer h3"></div> <div class="hex-inner h1"></div> <div class="hex-inner h2"></div> <div class="hex-inner h3"></div> <div class="label">+</div> </div> </a>
February 4, 2016 at 8:00 am #237697Paulie_DMemberTo make the black background transparent you can replace the background:#000000 on .hex-inner with background: rgba(0,0,0,.75);
This, of course, will only show the background of the
hex-outer
divs underneath..which I suspect is not what the OP wants.February 4, 2016 at 8:05 am #237698koenigsegg1ParticipantIf you want to make it look transparent, you could just make it a slightly darker color like
#3C013C
. If you actually make it transparent, it will make a weird pattern like @Paulie_D said.February 4, 2016 at 8:27 am #237700Alecar983ParticipantI just want it to be the same as the background of the whole webpage so it matches with it, I realise making it transparent probably won’t work.the webpage background is like a starry space picture so if it didn’t match up it would look really weird.
February 4, 2016 at 9:19 am #237705Alecar983Participantlike when i use this http://codepen.io/Alecar983/pen/dGqgbK?editors=0100 it doesn’t match up with the background but it has the background, is there anyway to make it mimic the background behind it?
February 4, 2016 at 9:35 am #237706koenigsegg1ParticipantIt may be easier for you to just use an image like this SVG I made. I used Inkscape, a free WYSIWYG vector graphics editor. Just save the image, upload it to your server, and reference it in your website.
February 4, 2016 at 9:40 am #237707Paulie_DMemberIt may be easier for you to just use an image like this SVG I made.
Did you notice the effect when you hover the original Codepen (which now is broken it seems)….this is not just a simple shape…it’s quite complex.
Definitely, something for SVG though…just harder than you might think.
February 4, 2016 at 9:44 am #237708koenigsegg1ParticipantYes, @Paulie_D. I did see that but I’m not so good with inline SVG, so I thought I’d give him a quick fix.
February 4, 2016 at 10:08 am #237709Alecar983ParticipantI just want a website that has these hexagon buttons that when hovered have a effect and when pressed become translated so it looks like it has been pressed. And obviously has to link somewhere.
I want it to look like this, I made this in photoshop btw, http://imgur.com/nn0ufrA
February 4, 2016 at 11:50 am #237715bearheadParticipantI think you’re probably going to need to use svg for the outlined hexagons. There is probably a way to finagle it with just css, but it’s going to be messy and very prone to breaking.
To get the morphing animation you might try greensock’s morphsvg: http://greensock.com/morphSVG
I’ve never animated with that plugin before, so I can’t really give you much more help than that.
Here is a demo of it at it’s most basic (no morphing animation):
http://codepen.io/kvana/pen/NxLewJ -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.