Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the menu color at one point of one page site

Tags:

I am making a one page portfolio. The content of the site will be horizontal scrollable, only the menu is fixed. The first 2 pages are black and last one is white. But the 3rd page is half black and half white, it's kind a seperator of the two backgrounds.

http://i.stack.imgur.com/uiVqu.jpg

This is so far the best solution for my question: http://jsfiddle.net/a5a7x/1/ I only have problems to make it horizotnal not vertical.

This is the page content where i want to put the split: http://jsfiddle.net/n3FGr/

Remember, i only need to split the menu, because it will be fixed, so only the menu will have the split, when the content wil slide left and right.

like image 925
DeanDeey Avatar asked Jul 22 '12 17:07

DeanDeey


People also ask

How do I change the secondary menu color in WordPress?

Please go to Appearance -> Customize -> Header -> Primary menu -> Top menus item styling -> Normal, Hover/Active, to change the color of the menu. Please go to Appearance -> Customize -> Styling -> Background, to change the color of the site background. Regards.

How do I change the color of a section in Google sites?

Choose a style On a computer, open a site in classic Google Sites. Manage site. In the menu on the left, click Themes, Colors, and Fonts.

How do I change the color of my menu?

To change your menu's background color, click My Sites > Personalize > Customize. Once the Customizer screen loads, click CSS. Right-click on your navigation menu and choose Inspect. An Inspector panel will appear at the bottom of your screen, where you can view your website's underlying code.


1 Answers

Quick&Dirty rather close solution

gradient on text

I have explored the way to achieve your goal and have the some experiments:

  • Text in middle-center
  • Text in left-top angle
  • Menu in left-top angle
    enter image description here

I have not full solution, but the result is pretty good: (demo on dabblet)

HTML:

<div>     <h1>Chess</h1> </div> 

CSS:

div {     background: linear-gradient(45deg, black 52%, white 52%); }  ul {     background: linear-gradient(45deg, white 52%, black 52%);     -webkit-background-clip: text;     -webkit-text-fill-color: transparent; } 

Method of work:

Sync percents in each gradients:

52%: enter image description here
62%: enter image description here

Pros:

  • Plain html&css;

Cons:

  • Only webkit support;

The Canvas-way

Pros:

  • Cross-browser (mobile too)

Cons:

  • Javascript needed

The SVG-way

Pros:

  • Cross-browser
  • Javascript free (in static)
  • More semantical then Canvas
like image 136
Vladimir Starkov Avatar answered Oct 13 '22 14:10

Vladimir Starkov