css-shapes

Diamond menu items using CSS and SVG

亡梦爱人 提交于 2019-12-04 12:04:05
问题 I want to code the below design in HTML&CSS What I made so far is: I made it using: a links SVG as background Absolute position and translate(x,y) property in CSS. Please check this fiddle for the live link The issues in my design are: Each item is actually a rectangle, if you notice the highlighted rectangle in red, this is the area of the selection, so if you hover over the left corner of m2, it will select m3. I want to change the background color of the SVG background when hover, how to

Create a complex CSS shape (speaking bubble)

依然范特西╮ 提交于 2019-12-04 11:20:32
What would be your best option or method to create a shape as seen in the attachment link full CSS and is that possible anyway?? I did research and testing with CSS parallelogram e.g. but not with any good succes yet. See the shape here -->> http://tinypic.com/r/352ge3b/6 I had this thing that it could be done with just one element - and it can be done, I just don't think it's exactly the best solution to do it like this. DEMO HTML : <div class='speech-bubble'>Hello!</div> CSS : .speech-bubble { position: relative; margin: .5em auto; padding: 1em; width: 10em; height: 4em; border-radius: .25em

Fill element with slanted background on hover

妖精的绣舞 提交于 2019-12-04 09:59:23
I'm trying to create an CSS button hover effect . But I didn't manage to fill the element with a slanted shape. How the hover effect was planned: Screenshot 1: How it looks actually. Screenshot 2: How I want the hover effect to look like with slanted side. .button_sliding_bg { color: #31302B; background: #FFF; padding: 12px 17px; margin: 25px; font-family: 'OpenSansBold', sans-serif; border: 3px solid #31302B; font-size: 14px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; border-radius: 2px; display: inline-block; text-align: center; cursor: pointer; box-shadow: inset 0 0

Is there any way to colorize only part of image on hover?

假如想象 提交于 2019-12-04 09:48:48
问题 I would love to code simple image painting in HTML, CSS and probably jQuery also. Let's say I have a original image, and I want make it colorized but only in part of hover (or 10x10px square or circle of image where cursor is). I applied some filters to make it grayscale with CSS, but I have no idea how to colorize only hover part (not whole picture). Example image of best result (keeping colorized advice would be great, but not necessarily). 回答1: You could do this using svg 's mask and

How can I create a postage stamp border?

本秂侑毒 提交于 2019-12-04 09:32:09
I would like a div to look like this: but would only like to use CSS, how would I go about creating a shape like this? Do I create custom border for the top and bottom? You can look at the code here, it does exactly what you want: http://codepen.io/orhanveli/pen/tbGJL The code from the website: HTML <!-- Lets create a CSS3 stamp --> <div class="stamp"> <!-- the image --> <img src="http://thecodeplayer.com/uploads/media/css3logo.png" /> </div> CSS *{margin: 0; padding: 0;} body { background: #B1d202; padding: 100px; text-align: center; } .stamp { width: 280px; height: 180px; display: inline

Shape oblique bottom border of a div

℡╲_俬逩灬. 提交于 2019-12-04 09:23:12
I'm building a simple website, and on its landing page I need two backgrounds. For that, I'm using two divs, one on top of the other. So far so good. The problem is, I want the bottom border of the first div (or the top border of the second) to be oblique. This is a sketch of what I want to do: Any idea how to accomplish this? I found this article, but it only works with floating elements, and it doesn't seem stable at all. http://sarasoueidan.com/blog/css-shapes/ Thanks in advance! html: div class="main-container" id="main-container1"> //all kinds of stuff </div> <div class="main-container"

Drawing angled lines in CSS

混江龙づ霸主 提交于 2019-12-04 09:18:52
问题 What I'm trying to do LOOKS simple, but I can't seem to figure out how to do it. As you can see in my image there are a couple of red lines that go across the bottom, then bend upwards close to the right side. Is there a way in CSS to draw a line like this? 回答1: You can create angled lines in CSS by using skew transforms ( transform: skew(Xdeg) ). Below is a sample snippet: .shape { height: 50px; width: 200px; border-bottom: 2px solid red; border-right: 2px solid red; -moz-transform: skew(

How to make this CSS hamburger menu entirely clickable?

▼魔方 西西 提交于 2019-12-04 09:12:27
I am working on a pure CSS hamburger menu icon, so far it's working great, except that the gaps between the lines are not clickable. How can I modify this code so that the entire button is clickable as opposed to just the lines? <a href="#" title="Open Menu" class="menu"></a> .menu { width:30px; height:5px; background-color:#000; position:relative; display:inline-block; } .menu:after, .menu:before { content: ''; width: 100%; height:5px; background-color:#000; position:absolute; } .menu:after { top:10px; left:0; } .menu:before { top:20px; left:0; } Here's a JSFiddle . Thanks! Just do this DEMO

Div elements to follow a curved path with CSS3

此生再无相见时 提交于 2019-12-04 08:41:39
So the basic idea is 1 - 9 seats at a curved table as though you are looking at them through first person view. I'm trying to get div elements which would be seats to flow on the outside of another div element that has a border radius to make it a semi oblong circle. I've found a few examples with an element being animated to flow across the container in an arc, but I will need the div/seats to be static. I am looking for any ideas or examples that can lead me in the right path. Finding points on ellipse and translating: If your oblong circle resembles an ellipse then you can find points on

How to make Background div inner curved using HTML, CSS? [closed]

陌路散爱 提交于 2019-12-04 07:21:32
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I want my section background look like as shown in the image at the end, how can i do that using css? .bg{ width: 400px; height: 200px; padding: 20px; text-align: center; border: 1px solid #000; background: red; color: #fff; display: flex; } .bg p{ text-align: center; margin: auto;