Play with it here, if you desire to fully immerse yourself in the circlejerk:
https://codepen.io/PicturElements/full/XaqdRd
Edit: audio doesn't seem to work when I try it on Android. Clearly Android is poorly implemented.
https://i.imgur.com/4zHa85y.png watermark free template
Edit: https://codepen.io/anon/pen/dmgbrP here's something for the lazier ones, just change the text in that JS box (once you do, it will update the template in a sec) then right click(or long press) the image and choose "save image"
I started as a graphic designer and moved towards web dev. Definitely something done with a vector graphics editor, like Illustrator, or Sketch, etc. I’ve even seen some amazing parallax done with them. firewatch parallax
Flexbox would solve this.
Edit: (to expand as I was on mobile earlier)
A quick example on Codepen: https://codepen.io/anon/pen/VWXbvv
The important bit here is that the .menu-item
is display: flex
, and the .count
has margin-left: auto
:
.menu-item {
display: flex;
}
.count {
margin-left: auto;
}
Check out this resource for more pointers: https://philipwalton.github.io/solved-by-flexbox/
It was this GIF that inspired me to try recreate it with HTML and CSS but ended up way off course with this.
This is clearly the top comment so going with a monthly STOCK ROULLETE.
Will give month by month updates on how fucked I am and who's fucking me the hardest.
I will get a tattoo of the last remaining stock after 7 months have passed.
Place your bets now on what you think winning stock will be
Where do you draw the line though? var j = DELAY / i;
looks suspicious right away. If j
is the intercept z
, and i % 2 - 1
is the view plane x
, then (i % 2 - 1) * j
(or (i % 2) * j - j)
) is the intercept x
with n / DELAY
for a bit of scrolling. The rest is just a normal checkerboard (x&1) != (z&1)
. The only difference between the original and this raycasty version is that both values are packed into i
so the divide ends up slightly different, but floor it beforehand and it looks like this which looks pretty similar to me.
I'm ready... are they?
I run two sessions; my First Friday (once a month, that's tonight!) group is doing White Plume Mountain and my every Saturday group is doing a homebrew campaign of my own creation.
I run a secondary computer (Surface) with a secondary Discord account for voices/effects/music. I run my midi controllers through FL Studio and I mix it all down through MME (audio repeaters) into Audacity...
Equipment shown:
Edit: Ignore my crappy patch job on the wall :x hehe
Edit: I've made some small changes that are automatically updated in the Codepen below
The default one was way too dark and contrasty in my eyes, so I softened it up and added some blue tinges, and added some minor "flair"
I didn't test it on all pages extensively but it should work for the most part, feel free to improve it 😬
I'm actually working on a simple game to learn this library right now, its pretty neat
(ignore my code, its a wreck, and it only works properly on chrome right now) https://codepen.io/Lsmagic/full/OxpXzO/
Stolen from Reddit Bounce Effect:
CodePen: https://codepen.io/alukarulz/full/rZpeyP/
Streamable: https://streamable.com/whed6
You can fork it and customize it to your liking if you know what you're doing.
CodePen link: https://codepen.io/Tepec/pen/aKNeeN
Also, small note: I added a small JS function to enable "swiping left/right" through panels on touch-enabled devices, and some dirty code to enable keyboard arrow navigation as well.
I am truly humbled to present my own effort.
Pros: Nice, even design, supporting an indeterminate number of states.
Cons: Relies on as-yet-undeveloped CSS @media flag { ... }
technology.
"Hey, it's not fair because I had to wait " + myAge + " years to play. So, you have to wait " + (myAge - yourAge) + " more years to play."
edit: Do I declare variables like this? https://codepen.io/gitPhunky/full/KmrjQP/
I don't know why(*) but the volume seemed to scale weirdly, it was already pretty well hearable at 1% overlap, and 20% to 100% seemed to have only a small volume difference.
I tuned the line JS line 54:
audio.volume=Math.pow(overlap,2.5);
This way it scales a bit better than with linear function, with 0-20% being really silent compared to 100%.
Direct link to tweaked version.
^(*check /u/Ph0X's reply for why it doesn't really work that well with linear growth.)
As /u/pdr1017 said, you could also try this with SVG and a drop shadow filter.
Like in this (quick) example (try ~~it on desktop~~ to move the button around).
you can easily write a jquery script to make a fake password input that intercepts input, puts it in another hidden input and just displays * in the primary one.
We need a media drinking game for this.
Aquaman movie sinks
New wave of DC films disappoints.
Film smells fishy
Audience doesn't take the bait
Sharks circling DCEU
Tide turning against WB
Film doesn't have the depth.
Something something bottom feeders
Hmm, should have used some of that in my review generator
Inspired by this comment.
Here's a codepen (very heavily adapted from here), I don't do JS so pls no lynch.
because it's being rendered using RGB. of Red, Blue, and Green, which two do you combine to make yellow? the answer is red and green in an Additive Color Structure. But it makes for a pretty piercing yellow, which is often illegible against white. Here's a quick example of their yellow
It is a backdrop filter. It's not supported yet in many browsers (only in Safari I think), but you can probably try JS implementations like HERE or SVG solution.
https://codepen.io/joanjetson/full/jzZjOW/
There is my random prequel quote generator. It shall provide plenty of ammunition for shitposts.
It will get a random line of dialog from any of the prequels scripts, who said it, and from which movie. May the force be with you.
Realistically in terms of layout, it could be easily done using good ol divs. I had a brief moment during a break to try something for ya - bit loosey goosey but you could give something like this a shot (codepen). Without more info on what you're specifically trying to do I can't say anything more though, from what it sounds like you're probably looking for some kind of custom modal here. In regards to the images, you could easily set a background image in the divs, or offset things appropriately if you'd need icons or something along those lines here.
It would be fun to create a randomized character (Utility: https://codepen.io/trunksbomb/full/dOYdpN/) and run a gauntlet of these quests. It would also be great if your doing a 'hardcore' run and try to see how many of these quests you can complete before you die.
Great App scrubking!
There’s something kind of fascinating about the self-loathing that seems to me to be at the core of 4chan. Take, for instance, this “Robot” test from the /r9k/ board. (Click here for an easier way to tally your score). Is this self-revulsion, or gallows humor, or something else? I cannot think of another Internet community which reviles itself and likes picking at its own scabs like 4chan does.
For the record, I’m a “Chad” according to this quiz.
I agree that hyphenation is a big part of it. I think for a fair comparison you need to either turn off hyphens in TeX or turn on hyphens in the web example.
This is a live version of what it looks like with hyphens turned on: https://codepen.io/ActionScripted/pen/RjYXxJ
It breaks and aligns in a very similar way. It might not be perfect or exactly the same as TeX but it's a much more accurate comparison between TeX and web typography. This works in all major browsers except for Chrome on Windows.
Just got started! It looks like the 800+ hours is only necessary if you want to partner directly with a non-profit. There are solo projects you can tackle immediately upon joining – go to the "Map" link in the navigation and you can get to them.
Edit: also, holy shit – to whoever said that this site is only good if you're a beginner programmer: yes, there are a lot of tutorials for brand new programmers. But the projects? Oh my god, man.
For instance, "Build a Rougelike Dungeon Crawler in React." A project for which they tell you to "recreate the functionality of this CodePen." You can use whatever libraries or APIs you want, and you can design the game however you want – just keep the functionality the same.
Then, they provide you a Help chatroom on gitter to talk to the other students working on projects, and then let you get on with it. No further instructions, no more tutorials. "Build it."
This site is EXACTLY what I was looking for. THANK YOU
You are right! Did a quick test here
Edit: Have a play yourself https://codepen.io/anon/pen/eLzbve
Delivered:
https://codepen.io/anon/pen/QadaQY
Slopped that together about as lazily as possible. Seems to come up with some good ones though. My favorites so far:
Quantity of Brow Protectors of Nuts Users of Moustache Hoods of Loincloth Potato of Skullduggery
Could be improved with a better list including correct pluralization. But w/e.
I'm less than 100 seconds in and he's saying it would be impossible… but you can definitely do that with flexbox.
Edit: "Flexbox can't do that"
The HTML (exactly what he says won't work):
<div class="wrap"> <div class="main_content"></div> <div class="other_content"></div> <div class="sidebar"></div> </div>
It seems like he somehow failed to learn about both order
and flex-wrap
.
Edit 2: Around 11 minutes he finally gives a good example. Though his semantic markup which assigns classes to unique semantic elements is certainly "interesting".
Edit 3: Added a link to the first demo.
GSAP is a sophisticated and established animation library. You can do a lot more with GSAP than you can with Anime, and Greensock is a better performing library as well.
Anime.js is the young upstart. It's a small library (~6kb) and it's got some talented devs behind it. Very promising future. That being said, GSAP is the industry standard and has a much bigger community and documentation base. I typically find myself reaching for GSAP.
I've got 4 now:
Edit: I've got 9 relatively reliable cams, I'm gonna keep it where it is for now.
Enjoy!!
I made two variants of this pen:
A size-optimized version using svgo
, which combines the "wave" paths and reduces the number precision to 1 decimal place. I also moved some duplicate attributes to the stylesheet. The resulting image is less than 30% the size of the original.
A standalone version which can be added to a page using an img tag.
Edit: /to/two/
Looks good! However, it seems like it falls apart if you give the background a color, and you'd kind of expect the "notch" to inherit the background color as well
https://codepen.io/anon/pen/oMRGOe
edit: seems like something like this https://codepen.io/anon/pen/Yjbrme (edited slightly from /u/Dutch_Mountain) works well!
I've been trying to up my CSS game lately and have been going through this starting with day 1 and trying to recreate each image without looking at the code.
If I'm stuck I'll go through and see how he did something and there have been a couple of times I've used more JS than I'd like to, but it's taught me a ton so far and I'm only about 15 'days' in.
What a strange time we live in when it's refreshing to get a new Cookie Clicker Clone.
It's good from what I've seen so far. Played a couple of hours. Using Chrome, found no bugs. The lower tiers don't become irrelevant the instant you can buy something new. I like the look of the big water drop and that it's click animation doesn't restart before it is done. A large amount of achievements gives you some sort of end goal.
Suggestions:
I use Angular 6 at work to build production apps for a range of industries, Angular was an internal decision because they wanted to move away from Knockout JS.
I use Vue for all my personal projects and I create prototypes with vue just because the setup is quick and simple. Here are two Codepen templates that I use to spin up a quick concept or demo. Vue App & Vue App using Router
.Head{ display: flex; flex-direction: column; justify-content: center; align-items: flex-end; }
technically it's visualizer but in context this has to be cooler then just drawing lines
I would suggest you spend another day and give us something way cooler
some inspiration https://codepen.io/nfj525/pen/rVBaab
here is insane list of visualizer resources and demos https://github.com/willianjusten/awesome-audio-visualization
> I don't think he is trying to be deceptive
He is.
I myself too really started programming few months ago, but that doesn't change that I already tried learning multiple times in the past.
And even if I "forgot" what I learned that's not really true..
When I started learning again I actually felt that most introduction courses were easy to me.
Concepts like statements, operand, operators, conditional flow, and other things or the basics of returning values or inheriting were very fast and easy to catch up.
If I was really a complete beginner it would've took me much longer to assimilate those concepts. Might've been months.
It took me like a month to write a crypto tracker in Python (very basic stuff with http requests and console output), it took me like 4 days to write this code to scroll words with keyboard:
https://codepen.io/Aquazi/pen/dJopLO
It took me like 5 days to write this (resizing divs by dragging white bar):
https://codepen.io/Aquazi/pen/JOZaNL
But it would probably took much longer somebody who didn't have coding experience.
If I said that I wrote those stuff after few weeks of coding I'd be straight lying.
https://codepen.io/anon/pen/rqWeqe?editors=0001
​
function add() { if (arguments.length === 2) { return arguments[0] + arguments[1]; } if (arguments.length === 1) { let firstArg = arguments[0] return function(secondArg) { return secondArg + firstArg } } }
Hopefully the code is self-explanatory.
Unfortunate that this library doesn't really take accessibility into account, that's something that should always be considered. https://codepen.io/marcysutton/pen/JoQqVw
Edit: updated with more relevant example
HTML5 with CSS is Turing-complete, though, because you can implement a Wolfram's Rule 110 cellular automaton in it, in which you can build a Turing machine.
Nice, the one suggestion I'd make here is to change the ratio of width:height to sqrt(2):1. Since your main element has a height of 95vh, I'd change the width to be 134 or 135vh to more closely match the given image.
This is how it looks in different browsers.
Source : @martijn_cuppens
EDIT : Somebody wrote a code to animate how the offset is handled. Run it on every browser you can to see how everyone messes it up.
i just spent forever finding this website , but i always thought this was such a perfect homepage.
you can also just build a grid with the projects you are most proud of, and link your github separately.
this was the wrong link here it is . this is probably my favorite example.
another thing thats cool is p5.js its a javascript library that makes shapes and reactive animations easily.
I use this notation pretty much every day. Kind of shocked not many people seem to know about it, even still!
Infact, I used it on this CodePen for the Android update spinner that got a lot of traction on here a good while back and people were commenting a lot about the notation then, too.
So there were some people who put the promo tag in their profile picture on the forum and thought I'd do the same to mock the way CG dealt with the whole XMas deal promo fiasco.
The switch is DayNightSwitch
you can find it on GitHub
Flex isn't inline by default. The items within the flexbox work as if they were inline, but the actual flexbox element itself is a block. inline-flex is like combining display: inline-block
with display: flex
See https://codepen.io/anon/pen/qmGPMY for a quick example.
Whelp, I'm back.
No Aerosmith or Scorpions song for you.
I really have to set up some convention for better bug reporting.
Aight, going by the comments so far, it appears the current release doesn't process inputs properly on Windows 7 for some users.
While working on version 0.9, I updated all libraries including the Windows SDK to the latest version, that apparently broke it.
And with that, I just lost the last bit of respect I had left for microshaft.
Guess I'll just hardlink everything now.
Let's get to work...
I'll just leave this here.
Make of it whatever you want.
I too suck(ed) at design. As an exercise, I forked you tribute page, and only changed the CSS.
https://codepen.io/anon/pen/LreRjP?editors=0100
So what how did I learn to suck less at design? I follow some simple rules.
Hope this helps
Nice video tutorial! You should check out IntersectionObserver
which allows you to trigger this without having a scroll event listener.
This is a pretty great article on Intersection Observer and it includes some nice examples such as lazy loading and tracking which section of a site you are in as you scroll.
I put together this card reveal codepen using it that triggers a simple GSAP animation.
Good job.
I'd suggest adding perspective to the card container so the flip animation feels a little more realistic.
I forked it here https://codepen.io/evoactivity/pen/PdWrKj
Here's a half-assed attempt to make something sort of similar: CodePen
I used skewY transforms, so it's a bit different. Also, adding Slick for the carousel functionality makes the text all blurry in Chrome. Something to do with WebKit font smoothing in 3d transforms? Looks ok in Firefox Developer Edition. Anyway, maybe it's useful to someone.
For the exact same effect, probably yeah, like people are saying, use rotation and perspective, or use colored triangles.
Uhh, I'm lost. And not in the game, by your post:
> Latest version on top. You can try older version if you want. Version 0.0.0: https://codepen.io/erosire/full/ELvoKe/
It seems like you're saying that's the older version but I don't see another link to a different version. Either way, so far is there anything to do in this game other than walk around and collect resources. If there's a way to use those resources, I definitely wasn't patient enough to figure it out.
Otherwise, really like the style and you've got a lot of great ideas for things to come.
Bonus: it works in two dimensions! https://codepen.io/a8t/pen/QOjzpL
(I haven't fixed the focus when you hit the right side of the window or the bottom of the page yet, but that's one line each :) )
You gain not having to use something like SASS or LESS. Some people might like this feature native to CSS instead of relying in a preprocessor.
Also Javascript can interact with native CSS variables, leading to some neat stuff.
border: 8px solid rgb(74, 75, 74);
border-right: 0;
Or (I think):
border: 8px 0 8px 8px solid rgb(74, 75, 74);
Edit: nope, last method doesn't work.
It's not really mining. It's way less taxing on your hardware.
Here's a test for the fragile loop, which will ensure that the overall load on the endusers machines isn't too high and doesn't drain too much battery on mobile devices with the normal oyster dynasty script.
This is neat! Works well on mobile too. I made a fork changing two things:
I changed the border-style from dashed to solid to eliminate the glitchy-looking 'tail' each item had. I don't think they could ever look completely seamless using a dashed border and CSS alone. Maybe with SVG backgrounds.
I changed the tags from div/p to ol/li since this would literally be a numbered list of items.
Could use flexbox, I made a visual guide for it. https://codepen.io/AnchorIdeas/pen/GQbrgp
I think adding the following to your Div 1 should do the trick.
display: flex; justify-content: center;
and then you have the added control of either scaling them or stacking them on thinner screens with flex-wrap: wrap/no-wrap.
Print out one of these.
https://codepen.io/luminarious/full/rrqWdG#_=_
Every single day you're sober, put an X over it. Don't let there be a day where there's not an X. Bonus points if you put it in a public location.
It's super easy with A-Frame. I highly recommend it. Play around with this demo I built and change it around. https://codepen.io/derekm/pen/kkVbjX
Better yet, here are all the awesome demo's people better than I built https://aframe.io/blog/awoa-26/
I know this is already solved but I wanted to provided an alternate way of doing things (the more you know).
the image should have a width of 100%
Why you may ask does this work?
By setting the overflow to auto on the parent/wrapper div you give the default rule saying "make sure that whatever is in this div, stays in this div". and when you force the image to be 100% width of the div it stretches across all the way, this also makes the element responsive as well, because if the parent shrinks less than whatever you set the width to be, the image will resize accordingly.
I've added a codepen and commented the css rules.
Hope this helps!
Been teaching myself p5 so I thought I'd put a little time into trying to make the design: https://codepen.io/pfreema1/pen/xJJXOv
It's lacking the colors, blur filter, and gradient - but I think with more time one could get it quite close. It's probably more efficient (workwise) to just load it off a youtube embed though lol
Take a look at this example. Being able to proportionally resize elements based off of font-size
alone is a pretty powerful tool. This is a more common scenario.
Just try to recreate the button example using px
, you'll quickly see why it's inferior. On top of that px
unit does not respond to a users font setting on their browser. That alone is an accessibility nightmare.
This is the Fallout 3 loading screen.
This is the screen they had up for the Fallout 4 tease.
With Obsidian tweeting that it's not them, I'm thinking either Fallout 3 remaster or Fallout 5.
Would be very unexpected, for me, after all the Starfield rumblings.
you can check browser support here https://caniuse.com/#feat=async-functions
here's an example https://codepen.io/anon/pen/KRvQyE
you can use it regardless of browser support if you use babel to transpile your code.
> it doesn't touch on why people haven't etched out $$$$$ in their project budgets to do so
why would people need to budget money to use async/await?
That's a nice effect. I like the end result of yours better, but this example is done with CSS-only. I wonder if yours could be modified to be only CSS too? I would think the same techniques could be applied.
Personally, I think the borders darken the the "shine", this is part of the problem. I've seen things like add a sparkle but I don't see that working at 15px. Maybe something like this? https://codepen.io/anon/pen/BwxxQq
IE/Edge is also the only major browser to not support Unicode variation selectors. You have to select whether to display the symbol or emoji version of a glyph by changing your font.
We're actively using 'CSS 4' variables for user theming customization by allowing a custom stylesheet being served with overridden global variables. You can define a custom mixin to assign both sass and css4 variable to a property, so unsupported browsers will fall back to the non-customized default value:
https://codepen.io/jakealbaugh/post/css4-variables-with-fallbacks-using-sass
As a CSS front-end developer and UI designer I use it day to day and it saddens me to see a removal by the reddit team of any function pertaining to the lovely language. This flag is meant to embody the flow of the code, from the smooth transition to each horn of the "CSS bull", as I call it, to the symmetrical circle that shows the detail in beauty is just as important as the role the function portrays.
Also, the codepen version made with actual CSS is only going to work on 1080p monitors as I did it quite fast.
Hope you enjoy! :D
Εσύ είσαι ο ίδιος που έχει αναρτήσει το ίδιο μήνυμα σε διάφορα ιντερνετικά φόρουμ ή πρόκειται για copy pasta;
JavaScript:
var mainCount = 2; var mainTotal = 5; var overallLessThan = (mainCountᐸmainTotal) = 0;
if(overallLessThan) out.innerHTML += "mainCount is less then mainTotal!<br />"; else out.innerHTML += "mainCount is more then mainTotal!<br />";
if(mainCountᐸmainTotal) out.innerHTML += "mainCount is less then mainTotal!<br />"; else out.innerHTML += "mainCount is more then mainTotal!<br />";
https://codepen.io/SarahC/pen/XxPgNG?editors=0010
Hahaaa!
I started to make a little demo thing of some gestures which pay homage to the original buttons. https://codepen.io/ppdog/full/zmpQao/ Still doesn't fix the sizing problems but I thought maybe the bar could become transparent.
Yup. You can play around with the clip
property to achieve what you want - https://codepen.io/BTM/pen/pOybbg
Just keep in mind it's not supported at all in IE / Edge. If yuo need that, you can probably go crazy with semi-transparent backgrounds covering parts of the values instead.
You're not getting it. Specifying "ONLY [language here]" generally implies you were able to achieve something thought to be more complicated or thought to be achieved in a specific way, by using an alternative or lesser set of tools or languages. AKA a "CSS ONLY custom select menu" instead of writing a bunch of Javascript, or a "CSS ONLY detailed iphone drawing" instead of actually creating a digital design.
A design challenge to recreate something is fine. But specifying "ONLY HTML & CSS" as some sort of achievement or a "challenge" is confusing and unfitting. You haven't added any functionality or interaction, therefore, there's no need for any Javascript, therefore, there's no need to specify.
#4 isn't correct. An absolutely positioned element will position itself relative to it's most immediate, non-static parent. And it gets even weirder in that <code>transform</code> also triggers a new 'relative' context for the child element's placement.
I'm not sure why I went and did this, and this actually seems really low so there is probably a bug somewhere -- but here is a simulation to determine your chance to win: https://codepen.io/anon/pen/dmjYQm?editors=0010
After 10000 trials, won 7.25% and lost 92.75%
So uhm... I read this comment
And decided why not, so here you go, don't judge me. https://codepen.io/dSolver/full/zPamyV/
Simply amazing work. The updates are very helpful. I also see that as of earlier today the first version of Viper compiler is already operational also: https://codepen.io/yograterol/pen/aypYjP
I further see that the Commonwealth ICO has currently received 5555ETC. with current balance of 4905 in fund after 1st month's payment distributions made.
https://dexaran.github.io/ICO/
Current ICO runs til Sept 8, and Commonwealth is not yet halfway to the original goal of 12,000 ETC. Everyone is encouraged to read and consider the issues at the link above.
The Commonwealth Team is doing a lot of valuable work. Deserves Community Support.
Probably the easiest options would be looking into SVG or CSS :before to create a shape above a square rectangle DIV
Edit: I have never really used :before and :after but I put this together. It's more like the new chrome tabs but you could probably tweak it to look more like what you want https://codepen.io/anon/pen/rqqZdV
You need to use document.addEventListener
to listen for the key (or combo) you want, and then prevent the default action of that event with preventDefault()
CodePen
https://codepen.io/MikeLuDev/pen/gjEpEN?editors=0011
Learning resources:
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault
I made a chart with all types. No clue if it's accurate, but I had fun making it :p https://codepen.io/lorgan3/pen/PBbVav/
If you spot any mistakes, leave a reply and I'll try fixing it!
Right now you're trying
vertical-align: center;
this is not a css property.
Set your HTML/body to height:100%
add a wrapper div around your table, set that to 100% aswell.
remove the top: and margin: auto; property from your table.
set the wrapper to
display:flex; align-items: center; justify-content: center;
this will center it vertically and horizontally.
Little tip: you don't need to use
position: relative;
that much, usually only when you also use a
position: absolute;
somewhere
another ps:
padding-left: 200px; padding-right: 200px;
is the same as:
padding: 0 200px;
Here's a codepen i made, so you can take a look at what i did, i imported the background image, but the other images don't work so don't get thrown off by that. Also if you copy my html, it all goes in your <body> tag. And replace the image links with the ones you were using, also in your CSS
Now try using the buttons in his example a few times, then press the back button.
It's never nice to be trapped on a page because the developer decided that avoiding JS > user experience.
Random google result: https://codepen.io/birjolaxew/post/cracking-captchas-with-neural-networks
It really depends on the difficulty of the captcha. While a neural network can beat a shitty captcha with ease, hard captchas like recaptcha sometimes are even difficult for humans to solve. Also, some captchas have migrated to image recognition etc.
Why don't you try it yourself? There are so many reasons and they'll become apparent when you try!
First off, if you specify a fixed width, the text will overflow if it's too long, look here.
Also, you can only align it in the center horizontally with a defined width & height using text-align. There's no way to align it vertically unless you're gonna use flex.
Also, it looks ugly when the text is right at the edge of the element, you want some space in between.
All the above are fixed using padding, the text will be the origin, therefore centered both horizontally and vertically, and when you use padding you can always have a standard, like a padding of 1 or 2em in all directions and it will work regardless of the length of the string.
Siempre quise intentar hacer algo con CSS y nunca me decidí... hasta hace 2 días. Esto es lo que hice hasta ahora:
Rick Sanchez: El código está muy sucio, pero ya lo voy a arreglar... Igual me gusta cómo quedó.
Honguito de Mario: Primer intento de hacer PixelArt con box-shadow. Ya estoy viendo qué hacer la próxima.
Ah gotcha, there may be a misunderstanding of what await
does... await
simply waits for the Promise to resolve, it does not call the Promises' code itself. The messages will show up even if you do not <code>await</code> them at all.
I assume you mean the "res #3 called after 1000 milliseconds" message. This is shown first because delay3
has the shortest time of the three; 1000 milliseconds.
Remember: all three have been executed at the same time, so it follows that delay3
will resolve first. In this case, "resolve" means the setTimeout
call has ~~been made~~ completed.
EDIT: To continue the earlier analogy, the runners are running to the finish line as they have been asked, but nobody is waiting for them at the end if there is no await
.
You can really do this with any theme with a single css style. You need to identify the element responsible for the background color, then just add a vertical css linear gradient to it, with the start being your day color, and the end being your night color.
If you want to make a complicated multi-step gradient (to have a sunset effect or something), you can visually generate the gradient using colorzilla's gradient editor
Here is a more complicated example (I didn't bother making the demo responsive, so view fullscreen to get the full effect), that shows off the other sorts of things you can do with color change on scroll, including a basic javascript detect for scroll position, that you can tie to other styles on the page, if necessary. (for example, you may need to change text colors, if you switch from day to night for your background)
The basic Javascript in that second example could also be used to change the background color as a whole, if you prefer to change the entire color of the background at once, rather than using a gradient. You would just have to replace the center section to match your needed logic (where it says // here is where you do any style changes your page needs
).
Oh I did something way simpler, you can find the code with various examples on CodePen here as I cleaned it up and extracted already.
Basically: there's a button group, all the buttons inside have some border and some "extra-borders" with pseudo elements, and a 0:0 box with a big shadow beneath the buttons follows the cursor whenever it's hovering the button group.
When I had used ArcGIS in the past, it was painful, but they've increased it a lot:
https://codepen.io/esri_devlabs/pen/JZeeEZ?editors=1000
ESRI also cares MORE about a different type of mapping than "driving directions".
It's what we use internally at my company for all mapping.
Kept thinking about this one for some reason and it's been a pretty slow day at work, so... here's version two: CodePen
Most obvious bad thing about this one is the photos look obviously skewed, so you'd have to pre-skew them the other way first to make them look all right.
Probably something like this thing I found on CodePen. Only a few lines of javascript. It basically says, "On hover, play the video. When no hover, pause the video."
I agree it's cool and useful.