GithubHelp home page GithubHelp logo

css-tip's Introduction

CSS Tip

CSS Tip is a personal project of mine for creating tooltips with nothing more than CSS ( and maybe a little JS for converting titles to datasets ), to fully custmize the look and feel of tooltips with stunning effects and more..

Using the CSS

At the moment, I split everything into three files for the sake of organization ; defaults, effects, and skins. Note that you should combine at least one rule from the skins file with the defaults if you don't want just text as the tooltip. Anyway, you can find more info below.

defaults : The defaults file contains what you think it contains ; the default tool tip settings. This resets the font and text properties, as well as some adjustments to position, margins, padding, etc..

effects : The effects file contains various hover effects, such as ; fade in, slide in, pop in, etc.. I'm sure I'll add more when I think of some. You can add one effect or combine multiple effects, as well as utilize classes to isolate certain effects to specific links.

example

skins : Lastly, the skins file contains the basic makeup of the tooltip ; font color, background, border, etc.. Since the defaults doesn't contain any background colors, I'd recommend at least copying one rule from this file to combine with the defaults.

Getting the tooltips to work

The tooltips are simple to get working, because the css uses the custom data-csstip attribute to display tooltip text. Simply add this attribute onto any HTML element you're using and you're set ! Here's a brief example on an anchor :

<a href="#top" data-csstip="Go to the top of the page">Top</a>

Now if you already have a ton of elements with the default title attribute and don't feel like changing them I also wrote a small script for converting the default title to the dataset title. You can add the script found here wherever you like in your document and you should be set.

Project

I'll be working on this from time to time, so check up whenever you want if you're interested. I plan on writing some more styles as well as writing a little generator to make generating a CSS tooltip code easier.

css-tip's People

Contributors

chrisbaldwinj avatar sethclydesdale avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

chrisbaldwinj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.