random text with html+css only (without PHP, javascript, java or any other language)

hello,
it is possible just with HTML + CSS to make such thing?
Lets say i give text "aaa", "bbb", "ccc".
And it should one time write "aaa", another time "ccc', and so on random. :)
This should be done with CSS + HTML only.
Is that possible? :)
fikitifikitifakAsked:
Who is Participating?
 
ccpjcConnect With a Mentor Commented:
No it isn't
0
 
hieloConnect With a Mentor Commented:
>>This should be done with CSS + HTML only. Is that possible? :)
No. Neither of them are able "manipulate" elements. You need to use scripting for that.
0
 
fikitifikitifakAuthor Commented:
hm, will wait for more answers, maybe someone knows :D
and if not possible, maybe with css3 will be possible?
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
hieloCommented:
>>hm, will wait for more answers,
In the mean time, I suggest you rething your strategy :)
0
 
hieloCommented:
I meant:
.. rethink ...
0
 
Mark StegglesWeb DeveloperCommented:
Not possible
0
 
cressetpkCommented:
not possible without scripting i think you should use javascript
0
 
David S.Commented:
You would have to use JavaScript or a server-side language, e.g. PHP, to do that.
0
 
dkellnerCommented:
Why "just" HTML and CSS?  With only a little Javascript you can do it, and I can't imagine a situation where Javascripting is not possible while CSS3 is.  Modern browsers are capable of JS, and yes, theoretically someone might switch it off but no, practically no one will.

So, are you SURE you need a solution without even Javascript?
HTML and CSS3 are not for that.  If you could get just one random number somehow, you could position a very long random string with CSS to only show a (random) part of it, which would look like "wow, it's another text every time" - but obviously it's not. If you can find a calculated value in CSS3 that represents milliseconds (I'm not aware of anything like that) then maybe, MAYBE, after p*ssing some blood, you could achieve the desired effect.  Worth it? :) Probably not.

So how'bout a good <script> ... </script> tag in body, which makes it a breeze to do it?
0
 
m1m1kCommented:
I think the original poster maybe does not realize that javascript code can be placed inside html, so that he can get his desired result easily.

Here's some code, try pasting it into your html.

<script language="JavaScript">
<!--
var r_text = new Array ();
r_text[0] = "All the leaves are brown";
r_text[1] = "And the sky is grey";
r_text[2] = "I've been for a walk";
r_text[3] = "On a winter's day";
r_text[4] = "I'd be safe and warm";
r_text[5] = "If I was in L.A.";
r_text[6] = "California dreaming, On such a winter's day";
var i = Math.floor(7*Math.random())

document.write(r_text[i]);

//-->
</script>

Open in new window


However, if you are trying to do something fancy on a site like facebook.com which disables javascript, then you can forget it.
The javascript is disabled so that people can't hack your account... its a good thing.
Forget about random text with just html and css, it can't be done.
0
 
Jason C. LevineNo oneCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.