line Element
The line element is one of eight pre-defined shapes supplied by VML.
Return to top of document
Before You Start
Before you can use VML within MSIE, there are two lines of code which
must be added to your web page. First, the normal <HTML> tag should be
replaced with the following:
<html xmlns:v="urn:schemas-microsoft-com:vml">
Also, the following line must be placed in the <HEAD> section of the web page:
<style> v\:* { behavior: url(#default#VML); }</style >
These two tags enable MSIE to recognize and render VML tags, such as the simple
rectangle VML tags we've seen so far. With these two lines entered, the core
HTML code will look like:
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<style> v\:* { behavior: url(#default#VML); }</style >
</head>
<body>
</body>
</html>
Return to top of document
line Element
The VML line element simplifies creating a basic shape, but if you want to create
an entirely new shape, use the shape element.
Line: <v:line style="width:100;height:100" from="0,0" _
to="100,100" strokecolor="red" strokeweight="4pt"/>
Return to top of document
Attributes
Like most of the pre-defined shapes, the line element
supports a standard, common core set of attributes. It
has two custom attributes.
Common Attributes
| adj
| A comma delimited list of numbers that are the parameters for the
guide formulas that define the path of the shape. Values may be omitted
to allow for using defaults. There can be up to 8 adjust values.
| | alt
| Alternative text associated with the shape.
| | class
| The CSS class of this shape
| | coordorigin
| The coordinates at the top-left corner of the containing block
| | coordsize
| The width and height of the coordinate space inside the containing
block of this shape
| | fillcolor
| The color used to fill the path of this shape. The fill sub-element
has a "color" attribute which will override this if specified
| | filled
| If set the path may be filled, if unset any fill specification
on the path should be ignored
| | href
| The URL to jump to if the shape is clicked on
| | id
| A unique ID that identifies the shape. Used by scripts to
reference the shape in a collection.
| | path
| A string containing the commands that define the path
(see path element for definition of the command set)
| | strokecolor
| The primary color of the brush to use to stroke the path
of this shape. The stroke sub-element has a "color" attribute
which will override this if specified.
| | stroked
| If true, the path defining the shape will be stroked.
By default, it will be stroked using a solid line unless
there is a stroke sub-element which may specify more complex
stroke properties. The stroke sub-element has an on attribute
which will override this if specified.
| | strokeweight
| The width of the brush to use to stroke the path. The stroke
sub-element has a "weight" attribute which will override this if specified.
| | style
|
| | target
| The target frame in a URL
| | title
| The title of the shape that may be displayed by editors
| | type
| A reference to a shapetype id that describes the standard
path, fill and stroke properties of a shape. Properties
specified in the shape will override the shapetype properties.
|
Custom Attributes
| from
| The starting point of the line in the coordinate space of the parent element.
| | to
| The ending point of the line in the coordinate space of the parent element.
|
|